Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/352.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java TableLayout中带有vewpager的自定义按钮_Java_Android_Android Tablelayout - Fatal编程技术网

Java TableLayout中带有vewpager的自定义按钮

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"

我有一个应用程序与TableLayout,但我不能使相同的设计,我会把链接下面

我的XML:



有什么想法吗?

我想你唯一的选择是用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>