{"id":976,"date":"2015-08-18T16:39:17","date_gmt":"2015-08-18T08:39:17","guid":{"rendered":"https:\/\/ai.zhousir.top\/?p=976"},"modified":"2015-08-18T16:45:33","modified_gmt":"2015-08-18T08:45:33","slug":"fragment%e4%bb%8b%e7%bb%8d%e5%92%8c%e8%bf%90%e7%94%a8","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=976","title":{"rendered":"Fragment\u4ecb\u7ecd\u548c\u8fd0\u7528"},"content":{"rendered":"<p>\u4e3a\u4e86\u5728Android\u4e0a\u4e3a\u7528\u6237\u63d0\u4f9b\u52a8\u6001\u7684\u3001\u591a\u7a97\u53e3\u7684\u4ea4\u4e92\u4f53\u9a8c\uff0c\u6211\u4eec\u9700\u8981\u5c06UI\u7ec4\u4ef6\u548cActivity\u64cd\u4f5c\u5c01\u88c5\u6210\u6a21\u5757\u8fdb\u884c\u4f7f\u7528\uff0c\u4f7f\u5f97\u6211\u4eec\u53ef\u4ee5\u5728activity\u4e2d\u5bf9\u8fd9\u4e9b\u6a21\u5757\u8fdb\u884c\u5207\u5165\u5207\u51fa\u64cd\u4f5c\u3002\u53ef\u4ee5\u7528Fragment\u6765\u521b\u5efa\u8fd9\u4e9b\u6a21\u5757\uff0cFragment\u5c31\u50cf\u4e00\u4e2a\u5d4c\u5957\u7684activity\uff0c\u62e5\u6709\u81ea\u5df1\u7684\u5e03\u5c40\uff08layout\uff09\u5e76\u7ba1\u7406\u81ea\u5df1\u7684\u751f\u547d\u5468\u671f\u3002<br \/>\n<!--more--><br \/>\n\u6211\u4eec\u53ef\u4ee5\u628afragment\u60f3\u8c61\u6210activity\u4e2d\u4e00\u4e2a\u6a21\u5757\u5316\u7684\u90e8\u5206\uff0c\u5b83\u62e5\u6709\u81ea\u5df1\u7684\u751f\u547d\u5468\u671f\uff0c\u63a5\u6536\u81ea\u5df1\u7684\u8f93\u5165\u4e8b\u4ef6\uff0c\u53ef\u4ee5\u5728acvitity\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u6dfb\u52a0\u6216\u8005\u79fb\u9664\uff08\u6709\u70b9\u50cf&#8221;\u5b50activity&#8221;\uff0c\u53ef\u4ee5\u5728\u4e0d\u540c\u7684activity\u91cc\u9762\u91cd\u590d\u4f7f\u7528\uff09<\/p>\n<p>\u5bf9Fragment\u8fd8\u4e0d\u4e86\u89e3\u7684\u540c\u5b66\u53ef\u4ee5\u53c2\u8003\u535a\u5ba2<a href=\"http:\/\/blog.csdn.net\/guolin_blog\/article\/details\/8881711\">Android Fragment\u5b8c\u5168\u89e3\u6790<\/a>\u4ecb\u7ecd\u4e86Fragment\u7684\u521b\u5efa\u3001\u9759\u6001\u6dfb\u52a0\u3001\u52a8\u6001\u6dfb\u52a0\u3001\u751f\u547d\u5468\u671f\u548c\u76f8\u4e92\u901a\u4fe1\u3002<\/p>\n<p>\u8fd9\u91cc\u6211\u4eec\u4ecb\u7ecd\u5982\u4f55\u7528Fragment\u5b9e\u73b0Tab\u5207\u6362\u7684\u65b9\u6cd5\uff0c\u5047\u8bbe\u5927\u5bb6\u5df2\u7ecf\u6491\u63e1RadioGroup,RadioButton\u5b9e\u73b0Tab\u9009\u9879\u5361.\u5728\u5b66\u4e60FragmentTabHost\u4e4b\u524d\u53ef\u4ee5\u53c2\u770b<a title=\"Permalink to Android\u4e2dTabHost\u4e3b\u754c\u9762\u5b9e\u73b0\" href=\"https:\/\/ai.zhousir.top\/?p=846\" rel=\"bookmark\">TabHost\u4e3b\u754c\u9762\u5b9e\u73b0<\/a><\/p>\n<p><strong>FragmentTabHost\u5b9e\u73b0<\/strong><\/p>\n<p>\u9996\u5148\u5b9a\u4e49\u5e03\u5c40activity_raido_tab_fragment_layout.xml<\/p>\n<p>[java]<br \/>\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br \/>\n&lt;android.support.v4.app.FragmentTabHost xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;<br \/>\n    android:id=&quot;@android:id\/tabhost&quot;<br \/>\n    android:layout_width=&quot;match_parent&quot;<br \/>\n    android:layout_height=&quot;match_parent&quot; &gt;<\/p>\n<p>    &lt;RelativeLayout<br \/>\n        android:layout_width=&quot;match_parent&quot;<br \/>\n        android:layout_height=&quot;match_parent&quot; &gt;<\/p>\n<p>        &lt;TabWidget<br \/>\n            android:id=&quot;@android:id\/tabs&quot;<br \/>\n            android:layout_width=&quot;match_parent&quot;<br \/>\n            android:layout_height=&quot;wrap_content&quot;<br \/>\n            android:layout_alignParentBottom=&quot;true&quot;<br \/>\n            android:background=&quot;@color\/gray_bg&quot;<br \/>\n            android:divider=&quot;@null&quot;<br \/>\n            android:visibility=&quot;gone&quot; &gt;<br \/>\n        &lt;\/TabWidget&gt;<\/p>\n<p>        &lt;RadioGroup<br \/>\n            android:id=&quot;@+id\/raidoGroupTab&quot;<br \/>\n            android:layout_width=&quot;match_parent&quot;<br \/>\n            android:layout_height=&quot;wrap_content&quot;<br \/>\n            android:layout_alignParentBottom=&quot;true&quot;<br \/>\n            android:background=&quot;@drawable\/button_color_confirm_selector&quot;<br \/>\n            android:orientation=&quot;horizontal&quot; &gt;<\/p>\n<p>            &lt;RadioButton<br \/>\n                android:id=&quot;@+id\/raidoTab1&quot;<br \/>\n                style=&quot;@style\/main_tab_bottom&quot;<br \/>\n                android:layout_width=&quot;wrap_content&quot;<br \/>\n                android:layout_height=&quot;wrap_content&quot;<br \/>\n                android:drawableTop=&quot;@drawable\/btn_tab_main&quot;<br \/>\n                android:text=&quot;\u9996\u9875&quot; \/&gt;<\/p>\n<p>            &lt;RadioButton<br \/>\n                android:id=&quot;@+id\/raidoTab2&quot;<br \/>\n                style=&quot;@style\/main_tab_bottom&quot;<br \/>\n                android:layout_width=&quot;wrap_content&quot;<br \/>\n                android:layout_height=&quot;wrap_content&quot;<br \/>\n                android:drawableTop=&quot;@drawable\/btn_tab_meishi&quot;<br \/>\n                android:text=&quot;\u7f8e\u98df&quot; \/&gt;<\/p>\n<p>            &lt;RadioButton<br \/>\n                android:id=&quot;@+id\/raidoTab3&quot;<br \/>\n                style=&quot;@style\/main_tab_bottom&quot;<br \/>\n                android:layout_width=&quot;wrap_content&quot;<br \/>\n                android:layout_height=&quot;wrap_content&quot;<br \/>\n                android:drawableTop=&quot;@drawable\/btn_tab_yule&quot;<br \/>\n                android:text=&quot;\u5a31\u4e50&quot; \/&gt;<br \/>\n        &lt;\/RadioGroup&gt;<\/p>\n<p>        &lt;FrameLayout<br \/>\n            android:id=&quot;@android:id\/tabcontent&quot;<br \/>\n            android:layout_width=&quot;match_parent&quot;<br \/>\n            android:layout_height=&quot;match_parent&quot;<br \/>\n            android:layout_above=&quot;@id\/raidoGroupTab&quot; &gt;<br \/>\n        &lt;\/FrameLayout&gt;<br \/>\n    &lt;\/RelativeLayout&gt;<\/p>\n<p>&lt;\/android.support.v4.app.FragmentTabHost&gt;<br \/>\n[\/java]<\/p>\n<p>\u6837\u5f0fmain_tab_bottom.xml<\/p>\n<p>[java] &lt;style name=&quot;main_tab_bottom&quot;&gt;<br \/>\n        &lt;item name=&quot;android:textSize&quot;&gt;@dimen\/bottom_tab_font_size&lt;\/item&gt;<br \/>\n        &lt;item name=&quot;android:gravity&quot;&gt;center_horizontal|bottom&lt;\/item&gt;<br \/>\n        &lt;item name=&quot;android:paddingTop&quot;&gt;@dimen\/bottom_tab_padding_up&lt;\/item&gt;<br \/>\n        &lt;item name=&quot;android:background&quot;&gt;@drawable\/home_btn_bg&lt;\/item&gt;<br \/>\n        &lt;item name=&quot;android:paddingBottom&quot;&gt;2.0dip&lt;\/item&gt;<br \/>\n        &lt;item name=&quot;android:layout_width&quot;&gt;fill_parent&lt;\/item&gt;<br \/>\n        &lt;item name=&quot;android:layout_height&quot;&gt;wrap_content&lt;\/item&gt;<br \/>\n        &lt;item name=&quot;android:button&quot;&gt;@null&lt;\/item&gt;<br \/>\n        &lt;item name=&quot;android:drawablePadding&quot;&gt;@dimen\/bottom_tab_padding_drawable&lt;\/item&gt;<br \/>\n        &lt;item name=&quot;android:layout_weight&quot;&gt;1.0&lt;\/item&gt;<br \/>\n    &lt;\/style&gt;[\/java]<\/p>\n<p>\u4ee3\u7801<\/p>\n<p>[java]@Override<br \/>\nprotected void onCreate(Bundle savedInstanceState) {<br \/>\n\tsuper.onCreate(savedInstanceState);<br \/>\n\tsetContentView(R.layout.activity_raido_tab_fragment_layout);<br \/>\n\tmRadioGroup = (RadioGroup) findViewById(R.id.raidoGroupTab);<\/p>\n<p>\tmTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost);<br \/>\n\tmTabHost.setup(this, getSupportFragmentManager(),android.R.id.tabcontent);<\/p>\n<p>\tmTabHost.addTab(mTabHost.newTabSpec(&quot;tab1&quot;).setIndicator(&quot;\u9996\u9875&quot;),FragmentMain.class, null);<br \/>\n\tmTabHost.addTab(mTabHost.newTabSpec(&quot;tab2&quot;).setIndicator(&quot;\u641c\u7d22&quot;),FragmentSearch.class, null);<br \/>\n\tmTabHost.addTab(mTabHost.newTabSpec(&quot;tab3&quot;).setIndicator(&quot;\u8bbe\u7f6e&quot;),FragmentSetting.class, null);<\/p>\n<p>\tmRadioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {<\/p>\n<p>\t\t@Override<br \/>\n\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {<br \/>\n\t\t\tswitch (checkedId) {<br \/>\n\t\t\tcase R.id.raidoTab1:<br \/>\n\t\t\t\tmTabHost.setCurrentTabByTag(&quot;tab1&quot;);<br \/>\n\t\t\t\tbreak;<br \/>\n\t\t\tcase R.id.raidoTab2:<br \/>\n\t\t\t\tmTabHost.setCurrentTabByTag(&quot;tab2&quot;);<br \/>\n\t\t\t\tbreak;<br \/>\n\t\t\tcase R.id.raidoTab3:<br \/>\n\t\t\t\tmTabHost.setCurrentTabByTag(&quot;tab3&quot;);<br \/>\n\t\t\t\tbreak;<br \/>\n\t\t\t}<\/p>\n<p>\t\t}<br \/>\n\t});<br \/>\n\t((RadioButton) mRadioGroup.getChildAt(0)).toggle(); \/\/\u9ed8\u8ba4\u9009\u4e2d\u7b2c\u4e00\u9879<br \/>\n}[\/java]<\/p>\n<p><strong>Fragment\u66ff\u6362\u65b9\u6cd5Replace\u5b9e\u73b0<\/strong><\/p>\n<p>\u5e03\u5c40\u5b9e\u73b0 fragment_tabs_replace_act.xml<\/p>\n<p>[java]&lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;<br \/>\n    xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;<br \/>\n    android:layout_width=&quot;match_parent&quot;<br \/>\n    android:layout_height=&quot;match_parent&quot;<br \/>\n    android:background=&quot;@drawable\/bottom_bg&quot;<br \/>\n    android:orientation=&quot;vertical&quot; &gt;<\/p>\n<p>    &lt;!&#8211; \u4e0a\u8fb9\u4e3b\u9875\u9762 &#8211;&gt;<br \/>\n    &lt;FrameLayout<br \/>\n        android:id=&quot;@+id\/fragments_content&quot;<br \/>\n        android:layout_width=&quot;match_parent&quot;<br \/>\n        android:layout_height=&quot;0dp&quot;<br \/>\n        android:layout_weight=&quot;1&quot; \/&gt;<\/p>\n<p>    &lt;!&#8211; \u5e95\u90e8\u83dc\u5355\u9875\u9762 &#8211;&gt;<br \/>\n    &lt;RadioGroup<br \/>\n        android:id=&quot;@+id\/bottomRg&quot;<br \/>\n        android:layout_width=&quot;fill_parent&quot;<br \/>\n        android:layout_height=&quot;wrap_content&quot;<br \/>\n        android:layout_gravity=&quot;bottom&quot;<br \/>\n        android:background=&quot;@drawable\/maintab_toolbar_bg&quot;<br \/>\n        android:orientation=&quot;horizontal&quot; &gt;<\/p>\n<p>        &lt;RadioButton<br \/>\n            android:id=&quot;@+id\/rbOne&quot;<br \/>\n            style=&quot;@style\/main_tab_bottom&quot;<br \/>\n            android:layout_marginTop=&quot;2.0dip&quot;<br \/>\n            android:drawableTop=&quot;@drawable\/icon_pinglun&quot;<br \/>\n            android:text=&quot;\u9996\u9875&quot; \/&gt;<\/p>\n<p>        &lt;RadioButton<br \/>\n            android:id=&quot;@+id\/rbTwo&quot;<br \/>\n            style=&quot;@style\/main_tab_bottom&quot;<br \/>\n            android:layout_marginTop=&quot;2.0dip&quot;<br \/>\n            android:drawableTop=&quot;@drawable\/icon_xianshi&quot;<br \/>\n            android:text=&quot;\u641c\u7d22&quot; \/&gt;<\/p>\n<p>        &lt;RadioButton<br \/>\n            android:id=&quot;@+id\/rbThree&quot;<br \/>\n            style=&quot;@style\/main_tab_bottom&quot;<br \/>\n            android:layout_marginTop=&quot;2.0dip&quot;<br \/>\n            android:drawableTop=&quot;@drawable\/icon_nongjiale&quot;<br \/>\n            android:text=&quot;\u8bbe\u7f6e&quot; \/&gt;<br \/>\n    &lt;\/RadioGroup&gt;<\/p>\n<p>&lt;\/LinearLayout&gt;[\/java]<\/p>\n<p>\u5b9e\u73b0\u4ee3\u7801:<\/p>\n<p>[java]@Override<br \/>\nprotected void onCreate(Bundle savedInstanceState) {<br \/>\n\tsuper.onCreate(savedInstanceState);<br \/>\n\trequestWindowFeature(Window.FEATURE_NO_TITLE);<br \/>\n\tsetContentView(R.layout.fragment_tabs_replace_act);<br \/>\n\tmRadioGroup = (RadioGroup) findViewById(R.id.bottomRg);<\/p>\n<p>\tmainFragment = (FragmentMain) FragmentMain.newInstance();<br \/>\n\tsearchFragment = (FragmentSearch) FragmentSearch.newInstance();<br \/>\n\tsettingFragment = (FragmentSetting) FragmentSetting.newInstance();<\/p>\n<p>\tmRadioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {<\/p>\n<p>\t\t@Override<br \/>\n\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {<br \/>\n\t\t\tFragmentTransaction  fragmentTransaction = getSupportFragmentManager().beginTransaction();<br \/>\n\t\t\tswitch (checkedId) {<br \/>\n\t\t\tcase R.id.rbOne:<br \/>\n\t\t\t\tif(mainFragment == null){<br \/>\n\t\t\t\t\tmainFragment = (FragmentMain) FragmentMain.newInstance();<br \/>\n\t\t\t\t}<br \/>\n\t\t\t\tfragmentTransaction.replace(R.id.fragments_content, mainFragment);<br \/>\n\t\t\t\tbreak;<br \/>\n\t\t\tcase R.id.rbTwo:<br \/>\n\t\t\t\tif(searchFragment == null){<br \/>\n\t\t\t\t\tsearchFragment = (FragmentSearch) FragmentSearch.newInstance();<br \/>\n\t\t\t\t}<br \/>\n\t\t\t\tfragmentTransaction.replace(R.id.fragments_content, searchFragment);<br \/>\n\t\t\t\tbreak;<br \/>\n\t\t\tcase R.id.rbThree:<br \/>\n\t\t\t\tif(settingFragment == null){<br \/>\n\t\t\t\t\tsettingFragment = (FragmentSetting) FragmentSetting.newInstance();<br \/>\n\t\t\t\t}<br \/>\n\t\t\t\tfragmentTransaction.replace(R.id.fragments_content, settingFragment);<br \/>\n\t\t\t\tbreak;<br \/>\n\t\t\t}<br \/>\n\t\t\tfragmentTransaction.commit();<br \/>\n\t\t}<br \/>\n\t});<br \/>\n\t((RadioButton) mRadioGroup.getChildAt(0)).toggle(); \/\/ \u9ed8\u8ba4\u9009\u4e2d\u7b2c\u4e00\u9879<br \/>\n}[\/java]<\/p>\n<p>Fragment\u66ff\u6362\u65b9\u6cd5\u6bcf\u6b21\u5207\u6362Tab\u7684\u65f6\u5019\u5b9e\u9645\u662f\u5148\u79fb\u9664(remove)\u518d\u6dfb\u52a0(add)Fragment,Fragment\u751f\u547d\u5468\u671f\u4f1a\u4eceonAttach\u5230onDetach<br \/>\n<a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/08\/life.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-977\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/08\/life.png\" alt=\"life\" width=\"297\" height=\"375\" \/><\/a><\/p>\n<p>\u7531\u4e0a\u53ef\u77e5\u5207\u6362\u65f6\uff0cFragment\u72b6\u6001\u662f\u4e0d\u80fd\u4fdd\u5b58\u7684\u3002FragmentSearch\u4e2dEditText\u8f93\u5165\u7684\u503c\u5207\u6362\u540e\u4fbf\u6d88\u5931.<br \/>\n<a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/08\/fragment_tab1.gif\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-978\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/08\/fragment_tab1.gif\" alt=\"fragment_tab1\" width=\"327\" height=\"542\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Fragment\u663e\u793a\u9690\u85cfshow\u548chide\u65b9\u6cd5\u5b9e\u73b0(\u89e3\u51b3\u72b6\u6001\u5b58\u95ee\u9898)<\/strong><br \/>\n\u5e03\u5c40\u6587\u4ef6\u548c\u4e0a\u9762\u4e00\u6837<\/p>\n<p>[java]@Override<br \/>\nprotected void onCreate(Bundle savedInstanceState) {<br \/>\n\tsuper.onCreate(savedInstanceState);<br \/>\n\trequestWindowFeature(Window.FEATURE_NO_TITLE);<br \/>\n\tsetContentView(R.layout.fragment_tabs_replace_act);<br \/>\n\tmRadioGroup = (RadioGroup) findViewById(R.id.bottomRg);<\/p>\n<p>\tmRadioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {<\/p>\n<p>\t\t@Override<br \/>\n\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {<br \/>\n\t\t\tFragmentTransaction  fragmentTransaction = getSupportFragmentManager().beginTransaction();<\/p>\n<p>\t\t\thideFragments(fragmentTransaction);<\/p>\n<p>\t\t\tswitch (checkedId) {<br \/>\n\t\t\tcase R.id.rbOne:<br \/>\n\t\t\t\tif(mainFragment == null){<br \/>\n\t\t\t\t\tmainFragment = new FragmentMain();<br \/>\n\t\t\t\t\tfragmentTransaction.add(R.id.fragments_content, mainFragment);<br \/>\n\t\t\t\t}else{<br \/>\n\t\t\t\t\tfragmentTransaction.show(mainFragment);<br \/>\n\t\t\t\t}<\/p>\n<p>\t\t\t\tbreak;<br \/>\n\t\t\tcase R.id.rbTwo:<br \/>\n\t\t\t\tif(searchFragment == null){<br \/>\n\t\t\t\t\tsearchFragment = new FragmentSearch();<br \/>\n\t\t\t\t\tfragmentTransaction.add(R.id.fragments_content, searchFragment);<br \/>\n\t\t\t\t}else{<br \/>\n\t\t\t\t\tfragmentTransaction.show(searchFragment);<br \/>\n\t\t\t\t}<\/p>\n<p>\t\t\t\tbreak;<br \/>\n\t\t\tcase R.id.rbThree:<br \/>\n\t\t\t\tif(settingFragment == null){<br \/>\n\t\t\t\t\tsettingFragment = new FragmentSetting();<br \/>\n\t\t\t\t\tfragmentTransaction.add(R.id.fragments_content, settingFragment);<br \/>\n\t\t\t\t}else{<br \/>\n\t\t\t\t\tfragmentTransaction.show(settingFragment);<br \/>\n\t\t\t\t}<\/p>\n<p>\t\t\t\tbreak;<br \/>\n\t\t\t}<br \/>\n\t\t\tfragmentTransaction.commit();<br \/>\n\t\t}<br \/>\n\t});<br \/>\n\t((RadioButton) mRadioGroup.getChildAt(0)).toggle(); \/\/ \u9ed8\u8ba4\u9009\u4e2d\u7b2c\u4e00\u9879<br \/>\n\t}<\/p>\n<p>    \/**<br \/>\n * \u5c06\u6240\u6709\u7684Fragment\u90fd\u7f6e\u4e3a\u9690\u85cf\u72b6\u6001\u3002<br \/>\n *<br \/>\n * @param transaction<br \/>\n *            \u7528\u4e8e\u5bf9Fragment\u6267\u884c\u64cd\u4f5c\u7684\u4e8b\u52a1<br \/>\n *\/<br \/>\nprivate void hideFragments(FragmentTransaction transaction) {<br \/>\n    if (mainFragment != null) {<br \/>\n        transaction.hide(mainFragment);<br \/>\n    }<br \/>\n    if (searchFragment != null) {<br \/>\n        transaction.hide(searchFragment);<br \/>\n    }<br \/>\n    if (settingFragment != null) {<br \/>\n        transaction.hide(settingFragment);<br \/>\n    }<br \/>\n}  [\/java]<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/08\/fragment_tab2.gif\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-979\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/08\/fragment_tab2.gif\" alt=\"fragment_tab2\" width=\"321\" height=\"532\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4e86\u5728Android\u4e0a\u4e3a\u7528\u6237\u63d0\u4f9b\u52a8\u6001\u7684\u3001\u591a\u7a97\u53e3\u7684\u4ea4\u4e92\u4f53\u9a8c\uff0c\u6211\u4eec\u9700\u8981\u5c06UI\u7ec4\u4ef6\u548cActivity\u64cd\u4f5c\u5c01\u88c5\u6210\u6a21\u5757\u8fdb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[67],"tags":[68],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/976"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=976"}],"version-history":[{"count":4,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/976\/revisions"}],"predecessor-version":[{"id":983,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/976\/revisions\/983"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}