Search code examples
androidandroid-tabs

Tabs like google play


I make my application that stores quotes, and I need to make it possible to sort quotes (by authors, by topic). And actually in tabs I want to show these ways.

But I really liked tabs like google play app

enter image description here

And I want to make the same in my application.

Tell me please, with the help of what I can do this?

Thanks.


Solution

  • Create xml in drawable folder and try this code to style buttons and use as a background of button like 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>