{"id":306,"date":"2011-10-02T21:02:59","date_gmt":"2011-10-02T12:02:59","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2011\/10\/02\/android_6\/"},"modified":"2011-10-02T21:02:59","modified_gmt":"2011-10-02T12:02:59","slug":"android_6","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2011\/10\/02\/android_6\/","title":{"rendered":"Android \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b \u691c\u7d22\u6a5f\u80fd\u3092\u7d44\u307f\u8fbc\u3080"},"content":{"rendered":"<p>\u30c7\u30d0\u30a4\u30b9\u306e\u691c\u7d22\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3089\u3001\u691c\u7d22\u6761\u4ef6\u3092\u5165\u529b\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u304c\u51fa\u3066\u304d\u3066\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c7\u30fc\u30bf\u3092\u691c\u7d22\u3067\u304d\u308b\u3088\u3046\u306a\u6a5f\u80fd\u3092\u81ea\u4f5c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u8ffd\u52a0\u3057\u3066\u307f\u308b\u3002<\/p>\n<p><a href=\"http:\/\/developer.android.com\/guide\/topics\/search\/search-dialog.html\">http:\/\/developer.android.com\/guide\/topics\/search\/search-dialog.html<\/a><\/p>\n<h2><\/h2>\n<h2><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Android_11296\/android_search01.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"android_search01\" border=\"0\" alt=\"android_search01\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Android_11296\/android_search01_thumb.png\" width=\"177\" height=\"292\" \/><\/a> <\/h2>\n<h2>2\u3064\u306e\u65b9\u6cd5<\/h2>\n<p>\u5b9f\u73fe\u3059\u308b\u306b\u306f\u3001\u691c\u7d22\u30c0\u30a4\u30a2\u30ed\u30b0(search dialog) \u3068 \u691c\u7d22\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8(search widget) \u306e2\u3064\u65b9\u6cd5\u304c\u3042\u308b\u3088\u3046\u3060\u3002<\/p>\n<p>\u691c\u7d22\u30c0\u30a4\u30a2\u30ed\u30b0\u306f\u3001\u30b9\u30af\u30ea\u30fc\u30f3\u306e\u6700\u524d\u9762\u306b\u8868\u793a\u3055\u308c\u308b\u30c0\u30a4\u30a2\u30ed\u30b0\u3002\u691c\u7d22\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306f\u3001UI\u306e\u4efb\u610f\u306e\u5834\u6240\u306b\u304a\u3051\u308b\u90e8\u54c1(<a href=\"http:\/\/developer.android.com\/reference\/android\/widget\/SearchView.html\">SearchView<\/a>) \u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3067\u3001EditText \u3068\u540c\u3058\u3088\u3046\u306a\u898b\u305f\u76ee\u3089\u3057\u3044\u3002\u3057\u304b\u3057\u306a\u304c\u3089\u3001\u691c\u7d22\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306f\u3001Android3.0(API\u30ec\u30d9\u30eb11)\u4ee5\u964d\u306e\u6a5f\u80fd\u3089\u3057\u3044\u3002Android3.0 \u306e\u5b9f\u6a5f\u306f\u6301\u3063\u3066\u3044\u306a\u3044\u3057\u3001\u73fe\u72b6\u958b\u767a\u5bfe\u8c61\u3068\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u691c\u7d22\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u63a1\u7528\u3059\u308b\u3002<\/p>\n<h2>\u304a\u304a\u307e\u304b\u306a\u6d41\u308c<\/h2>\n<p>\u5927\u304d\u306a\u6d41\u308c\u3068\u3057\u3066\u306f\u3001\u4ee5\u4e0b\u3067\u691c\u7d22\u6a5f\u80fd\u3092\u5b9f\u73fe\u53ef\u80fd\u3002\u691c\u7d22\u30b5\u30b8\u30a7\u30b9\u30c8\u3084\u3001\u30dc\u30a4\u30b9\u30b5\u30fc\u30c1\u306e\u8a2d\u5b9a\u3082\u3067\u304d\u308b\u3088\u3046\u3060\u304c\u3001\u4eca\u56de\u306f\u307e\u305a\u3001\u57fa\u672c\u7684\u306a\u691c\u7d22\u306e\u307f\u3092\u5b9f\u73fe\u3057\u305f\u3044\u3068\u601d\u3046\u3002<\/p>\n<ol>\n<li>\u691c\u7d22\u8a2d\u5b9aXML\u3092\u4f5c\u6210 (\/res\/xml\/searchable.xml) <\/li>\n<li>\u691c\u7d22\u53ef\u80fd\u306a\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u306e\u4f5c\u6210 <\/li>\n<li>\u691c\u7d22\u6761\u4ef6\u306e\u53d7\u3051\u53d6\u308a\u3068\u7d50\u679c\u306e\u8868\u793a <\/li>\n<\/ol>\n<p>&#160;<\/p>\n<h2>\u691c\u7d22\u8a2d\u5b9aXML\u306e\u4f5c\u6210<\/h2>\n<p>\/res\/xml\/searchable.xml \u3068\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u69d8\u306a\u5185\u5bb9\u306eXML\u3092\u4f5c\u6210<\/p>\n<pre class=\"prettyprint linenums\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;searchable xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\r\n    android:label=&quot;@string\/app_name&quot;\r\n    android:hint=&quot;@string\/search_hint&quot; &gt;\r\n&lt;\/searchable&gt;<\/pre>\n<h3>\u8a2d\u5b9a\u5185\u5bb9<\/h3>\n<p><a href=\"http:\/\/developer.android.com\/guide\/topics\/search\/searchable-config.html\">\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a><\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" width=\"551\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"165\">\u8981\u7d20<\/td>\n<td valign=\"top\" width=\"384\">\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"165\">android:label<\/td>\n<td valign=\"top\" width=\"384\">\u5fc5\u9808\u3002\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u540d\u3068\u3059\u3079\u304d<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"165\">android:hint<\/td>\n<td valign=\"top\" width=\"384\">\u691c\u7d22\u30dc\u30c3\u30af\u30b9\u306b\u30d2\u30f3\u30c8\u3092\u8868\u793a\u3002\u5fc5\u9808\u3067\u306f\u306a\u3044\u304c\u3001\u8868\u793a\u3057\u305f\u65b9\u304c\u3088\u3044<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&#160;<\/p>\n<h3>\u305d\u306e\u4ed6\u8a2d\u5b9a\u53ef\u80fd\u306a\u5185\u5bb9<\/h3>\n<ul>\n<li><a href=\"http:\/\/developer.android.com\/guide\/topics\/search\/search-dialog.html#SearchSuggestions\">\u691c\u7d22\u30b5\u30b8\u30a7\u30b9\u30c8<\/a> <\/li>\n<li><a href=\"http:\/\/developer.android.com\/guide\/topics\/search\/search-dialog.html#VoiceSearch\">\u30dc\u30a4\u30b9\u30b5\u30fc\u30c1<\/a> <\/li>\n<\/ul>\n<h2>\u691c\u7d22\u53ef\u80fd\u306a\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u306e\u4f5c\u6210<\/h2>\n<h3>AndroidManifext.xml \u306e\u7de8\u96c6<\/h3>\n<p>\u691c\u7d22\u304c\u5b9f\u884c\u3055\u308c\u308b\u3068\u3001Android \u30b7\u30b9\u30c6\u30e0\u306f\u3001\u691c\u7d22\u30af\u30a8\u30ea\u3092 <a href=\"https:\/\/www.typea.info\/blog\/index.php\/2011\/02\/11\/android_intent_twitter_evernote\">Intent<\/a> \u306b\u3064\u3081\u3066 ACTION_SEARCH \u30a2\u30af\u30b7\u30e7\u30f3\u3067\u9001\u4fe1\u3059\u308b\u3057\u3066\u304f\u308b\u306e\u3067\u3001\u4f5c\u6210\u3057\u305f\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u306e\u8a2d\u5b9a\u3092 AndroidManifest.xml \u306b\u3066\u5bfe\u5fdc\u3059\u308b\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>info.typea.eitangoroid.WordSearchableActivity \u306f\u3001\u4eca\u56de\u4f5c\u6210\u3059\u308b\u3001\u691c\u7d22\u53ef\u80fd\u306a\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3<\/p>\n<pre class=\"prettyprint linenums\"> &lt;application \r\n    :\r\n     &lt;meta-data android:name=&quot;android.app.default_searchable&quot;\r\n                 android:value=&quot;info.typea.eitangoroid.WordSearchableActivity&quot;\/&gt;\r\n     &lt;activity android:name=&quot;info.typea.eitangoroid.WordSearchableActivity&quot;&gt;\r\n         &lt;intent-filter&gt;\r\n             &lt;action android:name=&quot;android.intent.action.SEARCH&quot; \/&gt;\r\n         &lt;\/intent-filter&gt;   \r\n         &lt;meta-data android:name=&quot;android.app.searchable&quot;\r\n                android:resource=&quot;@xml\/searchable&quot;\/&gt;     \r\n     &lt;\/activity&gt;\r\n    :<\/pre>\n<ul>\n<li>\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u304c ACTION_SEARCH \u30a4\u30f3\u30c6\u30f3\u30c8\u3092 \u53d7\u3051\u53d6\u308b\u3088\u3046\u306b\u3001&lt;intent-filter&gt;\u306b\u5ba3\u8a00 <\/li>\n<li>\u691c\u7d22\u8a2d\u5b9a\u3092 &lt;meta-data&gt; \u306b\u8a18\u8ff0 <\/li>\n<li>\u691c\u7d22\u3092\u5b9f\u884c\u53ef\u80fd\u306a\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u3092\u5ba3\u8a00\u3059\u308b\u306b\u306f\u3001&lt;meta-data&gt; \u3092\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u306e &lt;acti<a href=\"http:\/\/typea.info\/tips\/wiki.cgi?page=vi\">vi<\/a>ty&gt; \u8981\u7d20\u306b\u8ffd\u52a0\u3059\u308b\u3002(\u305f\u3060\u3057\u3001applicatiopn \u76f4\u4e0b\u306b\u8a18\u8ff0\u3059\u308b\u3068\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3059\u3079\u3066\u306e\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u304b\u3089\u5229\u7528\u53ef\u80fd\u306b\u306a\u308b) <\/li>\n<\/ul>\n<p>&#160;<\/p>\n<h2>\u691c\u7d22\u6761\u4ef6\u306e\u53d7\u3051\u53d6\u308a\u3068\u7d50\u679c\u306e\u8868\u793a <\/h2>\n<p>\u691c\u7d22\u53ef\u80fd\u306a\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u3067\u3001\u4ee5\u4e0b\u306e\u3053\u3068\u3092\u884c\u3046\u3002<\/p>\n<ol>\n<li>\u691c\u7d22\u30af\u30a8\u30ea\u306e\u53d7\u3051\u53d6\u308a <\/li>\n<li>\u691c\u7d22 <\/li>\n<li>\u7d50\u679c\u306e\u8868\u793a <\/li>\n<\/ol>\n<p>\u901a\u5e38\u3001\u691c\u7d22\u7d50\u679c\u306f ListView \u306b\u8868\u793a\u3059\u308b\u3068\u826f\u3044\u3002\u307e\u305f\u3001ListActivity \u306f ListView \u3092\u542b\u307f\u3001\u3044\u304f\u3064\u304b\u306e\u4fbf\u5229\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3059\u308b\u3002<\/p>\n<h3>\u691c\u7d22\u30af\u30a8\u30ea\u306e\u53d7\u3051\u53d6\u308a<\/h3>\n<p>\u4ee5\u4e0b\u306e\u69d8\u306b\u3001Intent \u304b\u3089\u3001\u691c\u7d22\u6587\u5b57\u5217\u3092\u53d6\u5f97\u3067\u304d\u308b\u306e\u3067\u3001\u3042\u3068\u306f\u305d\u308c\u3092\u5229\u7528\u3057\u3066\u691c\u7d22\u3092\u5b9f\u884c\u3057\u3001\u7d50\u679c\u3092\u8868\u793a\u3057\u3066\u3042\u3052\u308c\u3070\u3088\u3044\u3002<\/p>\n<pre class=\"prettyprint linenums\"> @Override\r\npublic void onCreate(Bundle savedInstanceState) {\r\n    super.onCreate(savedInstanceState);\r\n    setContentView(R.layout.search_result);\r\n\r\n    Intent intent = getIntent();\r\n    if (Intent.ACTION_SEARCH.equals(intent.getAction())) {\r\n        String query = intent.getStringExtra(SearchManager.QUERY);\r\n            :\r\n    }<\/pre>\n<p>&#160;<\/p>\n<h3>ListActivity \u3092\u5229\u7528\u3057\u3066\u3001\u691c\u7d22\u53ef\u80fd\u306a\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u3092\u4f5c\u6210\u3059\u308b<\/h3>\n<p>\u3053\u3053\u307e\u3067\u3067\u3001\u57fa\u672c\u7684\u306b\u306fOK\u3060\u304c\u3001ListActivity \u3092\u5229\u7528\u3057\u3066\u7d50\u679c\u3092\u51fa\u3059\u3068\u3053\u308d\u307e\u3067\u30e1\u30e2\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"prettyprint linenums\">\/**\r\n * \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u56fa\u6709\u306e\u30c7\u30fc\u30bf(WordBook.Word) \u3092\u691c\u7d22\u3057\u3001\u7d50\u679c\u8868\u793a\u3092\u884c\u3046\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\r\n *\/\r\npublic class WordSearchableActivity extends ListActivity {\r\n    \r\n    @Override\r\n    public void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.search_result);\r\n\r\n        Intent intent = getIntent();\r\n        if (Intent.ACTION_SEARCH.equals(intent.getAction())) {\r\n            String query = intent.getStringExtra(SearchManager.QUERY);\r\n            \r\n            \/\/ \u691c\u7d22\u306e\u5b9f\u884c(SQLite\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b)\r\n            WordBookDao dao = new WordBookDao(this);\r\n            List&lt;WordBook.Word&gt; words = dao.selectWordsByQueryForKeyword(query);\r\n            \r\n            WordAdapter adapter = new WordAdapter(this, R.layout.search_result, R.layout.search_result_row, words);\r\n            setListAdapter(adapter);\r\n        }\r\n    }\r\n\r\n    \/**\r\n     * \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u56fa\u6709\u306e\u30c7\u30fc\u30bf(WordBook.Word) \u3092ListView\u306b\u8868\u793a\u3059\u308b\u305f\u3081\u306e\u30a2\u30c0\u30d7\u30bf\r\n     *\/\r\n    public static class WordAdapter extends ArrayAdapter&lt;WordBook.Word&gt; {\r\n        private List&lt;WordBook.Word&gt; items;\r\n        \r\n        public WordAdapter(Context context, int resource,\r\n                int textViewResourceId, List&lt;Word&gt; items) {\r\n            \r\n            super(context, resource, textViewResourceId, items);\r\n            this.items = items;\r\n        }\r\n\r\n        @Override\r\n        public View getView(int position, View convertView, ViewGroup parent) {\r\n            View view = convertView;\r\n            if (view == null) {\r\n                LayoutInflater lif = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n                view = lif.inflate(R.layout.search_result_row, null);\r\n            }\r\n            \r\n            TextView txtKeyword = (TextView) view.findViewById(R.id.txt_search_keyword);\r\n            TextView txtContent = (TextView) view.findViewById(R.id.txt_search_content);\r\n            \r\n            WordBook.Word word = items.get(position);\r\n            txtKeyword.setText(word.getKeyword());\r\n            txtContent.setText(word.getContent());\r\n           return view;\r\n        }\r\n    }\r\n}<\/pre>\n<p>ListActivity \u7528\u306e\u30ec\u30a4\u30a2\u30a6\u30c8<\/p>\n<p>\/layout\/search_result.xml<\/p>\n<pre class=\"prettyprint linenums\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\r\n\tandroid:id=&quot;@+id\/search_layout&quot;\r\n    android:orientation=&quot;vertical&quot;\r\n    android:layout_width=&quot;fill_parent&quot;\r\n    android:layout_height=&quot;fill_parent&quot;\r\n    &gt;\r\n    &lt;ListView android:id=&quot;@+id\/android:list&quot; \r\n              android:layout_height=&quot;wrap_content&quot; \r\n              android:layout_width=&quot;fill_parent&quot; android:scrollingCache=&quot;false&quot; android:dividerHeight=&quot;1px&quot; android:layout_gravity=&quot;top|left&quot; android:layout_weight=&quot;90&quot;&gt;\r\n              \r\n    &lt;\/ListView&gt;\r\n    &lt;TextView android:id=&quot;@+id\/android:empty&quot; \r\n              android:layout_width=&quot;wrap_content&quot; \r\n              android:layout_height=&quot;wrap_content&quot;\r\n              android:textSize=&quot;20sp&quot; android:text=&quot;@string\/msg_no_search_result&quot;&gt;\r\n    &lt;\/TextView&gt;\r\n&lt;\/LinearLayout&gt;<\/pre>\n<p>ListActivity \u884c\u7528\u306e\u30ec\u30a4\u30a2\u30a6\u30c8<\/p>\n<pre class=\"prettyprint linenums\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\r\n&lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot; \r\n    android:layout_width=&quot;fill_parent&quot; \r\n    android:layout_height=&quot;fill_parent&quot; \r\n    android:orientation=&quot;vertical&quot;&gt;\r\n\r\n    &lt;TextView \r\n        android:id=&quot;@+id\/txt_search_keyword&quot;\r\n        android:text=&quot;&quot; \r\n        android:layout_height=&quot;wrap_content&quot; \r\n        android:layout_width=&quot;wrap_content&quot; \r\n        android:layout_gravity=&quot;top|left&quot; \r\n        android:textSize=&quot;20sp&quot; \r\n        android:paddingLeft=&quot;6sp&quot;\/&gt;\r\n    &lt;TextView \r\n        android:id=&quot;@+id\/txt_search_content&quot; \r\n        android:text=&quot;&quot;\r\n        android:layout_width=&quot;wrap_content&quot; \r\n        android:layout_height=&quot;wrap_content&quot; \r\n        android:layout_gravity=&quot;bottom|left&quot; \r\n        android:paddingRight=&quot;10sp&quot; \r\n        android:textSize=&quot;14sp&quot;\/&gt;\r\n&lt;\/LinearLayout&gt;    <\/pre>\n<h2>\u6ce8\u610f\u70b9\u306a\u3069<\/h2>\n<h3><\/h3>\n<h2>onSearchRequested()<\/h2>\n<p>onSearchRequested() \u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u3067\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u306e\u691c\u7d22\u30dc\u30bf\u30f3\u304b\u3089\u3067\u306f\u306a\u304f\u3001UI\u304b\u3089\u3001\u691c\u7d22\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002(\u691c\u7d22\u53ef\u80fd\u306a\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u306e\u3067\u306f\u306a\u304f\u3001\u691c\u7d22\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u547c\u3073\u51fa\u3057\u305f\u3044<\/p>\n<p>\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u306eonSearchRequestede \u3092\u547c\u3073\u51fa\u3059)<\/p>\n<p>\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u306e\u691c\u7d22\u30dc\u30bf\u30f3\u304c\u5b58\u5728\u3059\u308b\u3053\u3068\u3092\u4eee\u5b9a\u305b\u305a\u306b\u3001UI\u3068\u3057\u3066\u30dc\u30bf\u30f3\u3092\u63d0\u4f9b\u3059\u3079\u304d\u3002<\/p>\n<h3>\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb<\/h3>\n<p>\u691c\u7d22\u30c0\u30a4\u30a2\u30ed\u30b0\u306f\u3001\u5358\u306b\u30c0\u30a4\u30a2\u30ed\u30b0\u306a\u306e\u3067\u3001\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u306e\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30e1\u30bd\u30c3\u30c9(onPause()\u306a\u3069)\u306f\u547c\u3073\u51fa\u3055\u306a\u3044\u3002<\/p>\n<h3>\u901a\u77e5<\/h3>\n<p>\u691c\u7d22\u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u306a\u3063\u305f\u6642\u306b\u51e6\u7406\u3092\u884c\u3044\u5bfe\u5834\u5408\u3001<a href=\"http:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onSearchRequested()\">onSearchRequested()<\/a> \u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3059\u308b\u3002<\/p>\n<p>\u691c\u7d22\u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u9589\u3058\u3089\u308c\u305f\u5834\u5408\u3001<a href=\"http:\/\/developer.android.com\/reference\/android\/app\/SearchManager.html#setOnDismissListener(android.app.SearchManager.OnDismissListener)\">setOnDismissListener()<\/a> \u3084 <a href=\"http:\/\/developer.android.com\/reference\/android\/app\/SearchManager.html#setOnCancelListener(android.app.SearchManager.OnCancelListener)\">setOnCancelListener()<\/a> \u3092\u5229\u7528\u3057\u3066\u3001\u901a\u77e5\u3092\u5f97\u308b\u3088\u3046\u306b\u3067\u304d\u308b<\/p>\n<p>&#160;<\/p>\n<h2>\u5b9f\u884c\u7d50\u679c<\/h2>\n<p>\u691c\u7d22\u30dc\u30bf\u30f3\u3067\u3001\u753b\u9762\u4e0a\u90e8\u306b\u30a2\u30d7\u30ea\u30a2\u30a4\u30b3\u30f3\u4ed8\u304d\u3067\u691c\u7d22\u6761\u4ef6\u3092\u5165\u529b\u3059\u308b\u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u3042\u3089\u308f\u308c\u3066\u30fb\u30fb\u30fb\u691c\u7d22\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u7d50\u679c\u304c\u30ea\u30b9\u30c8\u8868\u793a\u3055\u308c\u305f\uff01<\/p>\n<p><a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Android_11296\/android_search02.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"android_search02\" border=\"0\" alt=\"android_search02\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Android_11296\/android_search02_thumb.png\" width=\"164\" height=\"270\" \/><\/a> <a href=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Android_11296\/android_search03.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"android_search03\" border=\"0\" alt=\"android_search03\" src=\"https:\/\/www.typea.info\/blog\/wp-content\/uploads\/image\/Android_11296\/android_search03_thumb.png\" width=\"164\" height=\"270\" \/><\/a> <\/p>\n<p>&#160;<\/p>\n<p>\u3081\u3067\u305f\u3057\u3081\u3067\u305f\u3057\u3002\u307e\u305f\u4e00\u6b69\u91ce\u671b\u306b\u8fd1\u3065\u3044\u305f\u3002<\/p>\n<p><a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/487311456X\/ref=as_li_ss_il?ie=UTF8&amp;tag=typea09-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=487311456X\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws.assoc-amazon.jp\/widgets\/q?_encoding=UTF8&amp;Format=_SL160_&amp;ASIN=487311456X&amp;MarketPlace=JP&amp;ID=AsinImage&amp;WS=1&amp;tag=typea09-22&amp;ServiceVersion=20070822\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/www.assoc-amazon.jp\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=487311456X\" width=\"1\" height=\"1\" \/><a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4844329405\/ref=as_li_ss_il?ie=UTF8&amp;tag=typea09-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=4844329405\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws.assoc-amazon.jp\/widgets\/q?_encoding=UTF8&amp;Format=_SL160_&amp;ASIN=4844329405&amp;MarketPlace=JP&amp;ID=AsinImage&amp;WS=1&amp;tag=typea09-22&amp;ServiceVersion=20070822\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/www.assoc-amazon.jp\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=4844329405\" width=\"1\" height=\"1\" \/><a href=\"http:\/\/www.amazon.co.jp\/gp\/product\/4897978742\/ref=as_li_ss_il?ie=UTF8&amp;tag=typea09-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=4897978742\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws.assoc-amazon.jp\/widgets\/q?_encoding=UTF8&amp;Format=_SL160_&amp;ASIN=4897978742&amp;MarketPlace=JP&amp;ID=AsinImage&amp;WS=1&amp;tag=typea09-22&amp;ServiceVersion=20070822\" \/><\/a><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important\" border=\"0\" alt=\"\" src=\"http:\/\/www.assoc-amazon.jp\/e\/ir?t=typea09-22&amp;l=as2&amp;o=9&amp;a=4897978742\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30c7\u30d0\u30a4\u30b9\u306e\u691c\u7d22\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3089\u3001\u691c\u7d22\u6761\u4ef6\u3092\u5165\u529b\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u304c\u51fa\u3066\u304d\u3066\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c7\u30fc\u30bf\u3092\u691c\u7d22\u3067\u304d\u308b\u3088\u3046\u306a\u6a5f\u80fd\u3092\u81ea\u4f5c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u8ffd\u52a0\u3057\u3066\u307f\u308b\u3002 http:\/\/developer.android.com [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[39],"tags":[],"class_list":["post-306","post","type-post","status-publish","format-standard","hentry","category-android"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=306"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/306\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}