如何在我的平板电脑布局中设置标签文本中心?
问题描述:
我对平板电脑的布局工作largeland在这里我要居中的文本,但它出现在我如何能在中心如何在我的平板电脑布局中设置标签文本中心?
XML设定的角落在这里
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/tab_background_color"
android:elevation="4dp"
android:layout_centerHorizontal="true"
app:tabGravity="center"
app:tabIndicatorColor="@color/tabIndicatorColor"
app:tabIndicatorHeight="5dp"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/tabSelectedTextColor"
app:tabTextColor="@color/tabTextColor"> </android.support.design.widget.TabLayout>
答
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMaxWidth="0dp"
app:tabGravity="fill"
app:tabMode="fixed"
这是为我工作但为什么应用程序:TabMaxWidth =“0dp”?这是什么意思? –