google 之类的标签播放

Tabs like google play

我制作了存储引文的应用程序,我需要能够对引文进行排序(按作者、按主题)。实际上,我想在标签中显示这些方式。

但我真的很喜欢 google play app

这样的标签

我想在我的申请中做同样的事情。

请告诉我,在什么帮助下我可以做到这一点?

谢谢。

在 drawable 文件夹中创建 xml 并尝试使用此代码设置按钮样式并用作按钮的背景,例如 R.drawable.buttonStyle

  <selector xmlns:android="http://schemas.android.com/apk/res/android" >
 <item >
        <shape android:shape="rectangle" >
            <corners android:radius="5dip" />
            <stroke android:width="1dip" android:color="#1abc9c" />
            <gradient android:angle="-90" android:startColor="#1abc9c" android:endColor="#1abc9c" />
        </shape>
    </item>
</selector>