首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Xamarin Android Fit标签

Xamarin Android Fit标签
EN

Stack Overflow用户
提问于 2018-07-07 00:00:31
回答 1查看 47关注 0票数 0

我用Xamarin为安卓系统创建了标签,如下所示:enter image description here

代码:

代码语言:javascript
复制
<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>

我想这样做:

enter image description here

你能帮帮我吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-07-07 02:57:14

在TabLayout的样式中添加下一行

代码语言:javascript
复制
  <item name="tabMaxWidth">0dp</item>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51214051

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档