Skip to content

Instantly share code, notes, and snippets.

View siscofran999's full-sized avatar
🌴
Sans Boy

Fransisco siscofran999

🌴
Sans Boy
  • Jakarta, Indonesia
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- radius should be half of the desired TabLayout height -->
<corners
android:radius="15dp"/>
<!-- color of the selected tab -->
<solid
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- radius should be half of the desired TabLayout height -->
<corners
android:radius="15dp"/>
<!-- color of the selected tab -->
<solid
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@drawable/selector_tab_second"/>
<item android:state_selected="false" android:drawable="@drawable/unselector_tab"/>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="@color/colorBg">
<View