Bol*_*aul 1 android android-viewpager
我正在使用这个库https://github.com/astuetz/PagerSlidingTabStrip来创建一个PagerTabStrip.
我的输出 
你可以看到我的标签之后我有一些空的空间.我想让选项卡适合所有屏幕,或者至少使选项卡居中.那可能吗?
<com.astuetz.PagerSlidingTabStrip
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:background="@color/facebook_theme_light"
android:id="@+id/activity_posts_tabs"
android:layout_width="match_parent"
android:layout_height="48dip" />
<android.support.v4.view.ViewPager
android:background="@color/facebook_theme_dark"
android:id="@+id/activity_posts_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/activity_posts_tabs"
tools:context=".MainActivity" />
Run Code Online (Sandbox Code Playgroud)
我们正在寻找一个解决方案,并且已经在库中内置了一个,只需使用:
psts:pstsShouldExpand="true"
Run Code Online (Sandbox Code Playgroud)
并且选项卡将在布局中展开并居中.
| 归档时间: |
|
| 查看次数: |
4250 次 |
| 最近记录: |