其实就是一个布局问题
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <FrameLayout android:id="@+id/realtabcontent" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" /> <android.support.v4.app.FragmentTabHost android:id="@android:id/tabhost" android:layout_width="match_parent" android:layout_height="wrap_content" > <TabWidget android:id="@android:id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="match_parent" android:layout_height="wrap_content" /> </android.support.v4.app.FragmentTabHost> </LinearLayout>
本文介绍如何实现 FragmentTabhost 在应用界面底部显示的效果。通过使用 LinearLayout 布局,将 realtabcontent 放置在上方,FragmentTabhost 放置在下方,实现了所需布局。提供了一个具体的 XML 布局文件示例。
131

被折叠的 条评论
为什么被折叠?



