标签不充分宽的平板设备上[使用android.support.design.widget.TabLayout] [英] Tab not taking full width on Tablet device [Using android.support.design.widget.TabLayout]

查看:934
本文介绍了标签不充分宽的平板设备上[使用android.support.design.widget.TabLayout]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装标签为更新29/05/2015 这个职位。标签充分宽在我的Nexus 4手机,但是,承上启下7平板电脑在其中心不能覆盖整个屏幕宽度。 Naxus 7截图 Naxus 4屏幕截图

I have setup tabs as UPDATE 29/05/2015 this post. Tabs take full width on my Nexus 4 mobile but on nexus 7 tablet it in center and not cover full screen width. Naxus 7 screenshot Naxus 4 screenshot

推荐答案

从Kaizie 会href="http://stackoverflow.com/a/31188097/1438339">借了更简单的答案应用程序:tabMaxWidth =0dp在 TabLayout XML:

A "simpler" answer borrowed from Kaizie would just be adding app:tabMaxWidth="0dp" in your TabLayout xml:

<android.support.design.widget.TabLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:tabMaxWidth="0dp"
            app:tabGravity="fill"
            app:tabMode="fixed" />

这篇关于标签不充分宽的平板设备上[使用android.support.design.widget.TabLayout]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆