TabActivity 官网描述 This class is deprecated ,这类过期了 ,可以使用FragmentActivity 这个类 instead of ,二sdk没这个类 ,需在哪里下,以及 FragmentActivity 比 TabActivity 有什么改进 待高手解答 ,分自然送上
...全文
2313打赏收藏
TabActivity犀利问题
TabActivity 官网描述 This class is deprecated ,这类过期了 ,可以使用FragmentActivity 这个类 instead of ,二sdk没这个类 ,需在哪里下,以及 FragmentActivity 比 TabActivity 有什么改进 待高手解答 ,分自然送上
A replacement for TabActivity can also be implemented by directly using TabHost. You will need to define a layout that correctly uses a TabHost with a TabWidget as well as an area in which to display your tab content. A typical example would be:
<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:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <TabWidget android:id="@android:id/tabs" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="0"/> <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>