这是我要做的屏幕:
我不知道怎么做,如果可能的话!
事实上,我会使用像下面的xml一样的ViewPager和PagerTabStrip
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.PagerTabStrip
android:id="@+id/pager_title_strip"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/white"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:textColor="@color/primary_text" />
</android.support.v4.view.ViewPager>
Run Code Online (Sandbox Code Playgroud)
精度:内容必须是可滚动的,可以使用向左或向右滑动(= ViewPager)
但我不确定我是否能够更改所选"Tab"和"Tab Indicator"位置的背景.
此外,目前我不确定我是否只有3个标签.这就是为什么我会使用"PagerTabStrip"来使用可滚动的tabbar作为Google Play应用程序.
最后,如果我无法按照自己的意愿进行自定义,我认为使用"TabHost"但是它不能与"ViewPager"一起使用,我是对的吗?
如果你有更好的解决方案,我会考虑的.