you need to do this:
For the background of the tab, you need to create a selector this way
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/selected_tab" android:state_selected="true" /> <item android:drawable="@drawable/default_tab"/> </selector>
Now you can create a button with a different layout for your tab button, like this path. For this Button View requirement, set the tab icon on the top with the text.
tab_add_photo_btn.xml
<Button xmlns:android="http://schemas.android.com/apk/res/android" android:id="@id/tab_search" android:background="@drawable/tab_selector" android:drawableTop="@drawable/add_photo_icon" android:text="ADD PHOTO" android:textColor="#fff" android:padding="10dp"/>
source share