我用Xamarin为安卓系统创建了标签,如下所示:enter image description here
代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<android.support.design.widget.TabLayout
android:id="@+id/aprTabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TabLayout" >
<android.support.design.widget.TabItem
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Itens de Seguranca" />
<android.support.design.widget.TabItem
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Medidas Preventivas" />
<android.support.design.widget.TabItem
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Riscos" />
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
android:id="@+id/aprViewpager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
我想这样做:
你能帮帮我吗?
发布于 2018-07-07 02:57:14
在TabLayout的样式中添加下一行
<item name="tabMaxWidth">0dp</item>
https://stackoverflow.com/questions/51214051
复制相似问题