问题描述
我注意到 TabHost
已被弃用。
但是,当我在手机上运行应用程序时。我注意到它正常工作,没有错误。
为什么?在哪个 android 版本 TabHost
中不起作用。
我的安卓版本:Lollipop/5.1,安卓 API 级别:22。
我应该使用它吗?或者,我必须使用 ViewPager
和 TabLayout
。
<TabHost
android:id="@+id/tab_host"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/rl_">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/Filters"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
layout="@layout/filters_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:id="@+id/Adjustments"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
</FrameLayout>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#40cccccc" />
</LinearLayout>
</TabHost>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)