无标签标题的Android标签导航
我正在使用actionBarSherlock创建一个带有选项卡的应用程序。但我希望标签是唯一的,没有文字,没有图标,没有任何指示。用户可以通过切换从一个选项卡切换到另一个选项卡。我想要一个小标签指示器,别的什么都不要 我有什么办法可以做到这一点吗 我还希望它是向后兼容姜饼无标签标题的Android标签导航,android,tabs,actionbarsherlock,Android,Tabs,Actionbarsherlock,我正在使用actionBarSherlock创建一个带有选项卡的应用程序。但我希望标签是唯一的,没有文字,没有图标,没有任何指示。用户可以通过切换从一个选项卡切换到另一个选项卡。我想要一个小标签指示器,别的什么都不要 我有什么办法可以做到这一点吗 我还希望它是向后兼容姜饼 谢谢你 您可以像这样构建布局,然后在滑动和单击按钮时替换容器中的片段 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xm
谢谢你 您可以像这样构建布局,然后在滑动和单击按钮时替换容器中的片段
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/tab1"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="33"
android:onClick="showfrag1" />
<Button
android:id="@+id/tab2"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="33"
android:onClick="showfrag2" />
<Button
android:id="@+id/tab3"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="33"
android:onClick="showfrag3" />
</LinearLayout>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</FrameLayout>
谢谢!我会试试,让你知道!