【发布时间】:2020-09-23 13:03:00
【问题描述】:
我有一个带有 TableLayout 的应用程序,但我无法与设计中的相同,我将在下面放置链接
我的 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>
有什么想法吗?
【问题讨论】:
-
你想让你的标签(demo,new,..)显示在工具栏里面吗?
-
@Wini 是的,和上图一模一样
-
你能发布完整的xml代码和你到目前为止所做的截图吗?
标签: java android android-tablelayout