検索機能を追加する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Compose の方法を試す
Jetpack Compose は、Android に推奨される UI ツールキットです。Compose で検索機能を追加する方法について学びます。
Android のビルトイン検索機能をアプリで利用すると、すべてのユーザーに対して一貫した検索ユーザー エクスペリエンスを簡単に提供することができます。アプリに検索機能を実装する方法は、デバイスに搭載されている Android のバージョンに応じて 2 つあります。このドキュメントでは、システムのデフォルトの検索ダイアログを使用して、古いバージョンの Android との下位互換性を維持しながら、SearchView
で検索機能を追加する方法について説明します。
レッスン
- 検索インターフェースを設定する
- アプリに検索インターフェースを追加する方法と、検索クエリを処理するアクティビティを設定する方法について学びます。
- データを保存、検索する
- SQLite 仮想データベース テーブル内でデータを保存および検索する簡単な方法について学びます。
- 下位互換性を維持する
- 検索機能について、古いデバイスとの下位互換性を維持する方法について学びます。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[],[],null,["# Add search functionality\n\nTry the Compose way \nJetpack Compose is the recommended UI toolkit for Android. Learn how to add search functionality in Compose. \n[Filter a list →](/develop/ui/compose/quick-guides/content/filter-list-while-typing) \n\nAndroid's built-in search features offer apps an easy way to provide a\nconsistent search experience for all users. There are two ways to implement search in your app,\ndepending on the version of Android that is running on the device. This documentation covers how\nto add search with\n[SearchView](/reference/android/widget/SearchView) while maintaining\nbackward compatibility with older versions of Android by\nusing the system's default search dialog.\n\nLessons\n-------\n\n**[Set up the search interface](/develop/ui/views/search/training/setup)**\n: Learn how to add a search interface to your app and how to configure an activity to handle\n search queries.\n\n**[Store and search for data](/develop/ui/views/search/training/search)**\n: Learn a simple way to store and search for data in a SQLite virtual database table.\n\n**[Remain backward compatible](/develop/ui/views/search/training/backward-compat)**\n: Learn how to keep search features backward compatible with older devices."]]