Java TableLayout中带有vewpager的自定义按钮
我有一个应用程序与TableLayout,但我不能使相同的设计,我会把链接下面 我的XML:Java TableLayout中带有vewpager的自定义按钮,java,android,android-tablelayout,Java,Android,Android Tablelayout,我有一个应用程序与TableLayout,但我不能使相同的设计,我会把链接下面 我的XML: 有什么想法吗?我想你唯一的选择是用3个按钮创建一个自定义视图,然后自己导航。你想让你的选项卡(演示、新建,…)显示在工具栏内吗?@Wini是的,与上图完全相同。你能发布完整的xml代码和你现在所做的截图吗? <RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
有什么想法吗?我想你唯一的选择是用3个按钮创建一个自定义视图,然后自己导航。你想让你的选项卡(演示、新建,…)显示在工具栏内吗?@Wini是的,与上图完全相同。你能发布完整的xml代码和你现在所做的截图吗?
<RelativeLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp"
android:fitsSystemWindows="true"
android:background="@drawable/back"
tools:context=".MainActivity">
<com.google.android.material.tabs.TabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
android:clipToPadding="true"
android:clipChildren="true"
app:tabIndicatorHeight="0dp"
app:tabSelectedTextColor="@android:color/white"
app:tabTextColor="@android:color/white"
app:tabBackground="@android:color/transparent"
app:tabGravity="fill"/>
</RelativeLayout>