如何解决TabHost 已弃用
我注意到 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 举报,一经查实,本站将立刻删除。