【发布时间】:2017-08-24 02:33:36
【问题描述】:
我正在尝试在 XML 中创建一个 TabLayout 作为用户个人资料页面。本质上,我想在 3 个单独的选项卡上显示文本,并且文本将根据 Firebase 中的动态数据进行更新。这是我的代码,它没有呈现我的第一个选项卡。我主要针对以下设计:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/tabcontent">
<TabHost android:id="@+id/tab_host"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TabWidget android:id="@android:id/tabs"
android:layout_width="wrap_content"
android:layout_height="fill_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TEST"/>
</TabWidget>
</TabHost>
</FrameLayout>
【问题讨论】:
标签: android xml android-tabhost