I'm new to snippets on Android, and I mean the examples of the Fragments demos for the supprotv4 compatibility library.
Can someone explain why there are two layout frames (@+android:id/realtabcontent , @android:id/tabcontent) in the FragmentTabs.java example from Android Support4Demos.
FragmentTabs.java method call setContentView(R.layout.fragment_tabs); and the next is a layout file for the same.
fragment_tabs.xml
<TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TabWidget android:id="@android:id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="0" android:orientation="horizontal" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="0" /> <FrameLayout android:id="@+android:id/realtabcontent" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /> </LinearLayout> </TabHost>
Thank you in advance
source share