Created
December 11, 2017 10:56
-
-
Save sreelallalu/c23f17a4997d28b1d952e50905bfd300 to your computer and use it in GitHub Desktop.
TabLayoutCustomise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<!-- Non focused states --> | |
<item android:state_selected="false" | |
android:drawable="@drawable/defualttab" /> | |
<!-- Focused states (such as when focused with a d-pad or mouse hover) --> | |
<item android:state_selected="true" | |
android:drawable="@drawable/onselectedtab" /> | |
</selector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle"> | |
<size | |
android:width="95dp" | |
android:height="20dp" /> | |
<solid android:color="#ff30a3b6" /> | |
</shape> | |
</item> | |
</selector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle"> | |
<size | |
android:width="95dp" | |
android:height="20dp" /> | |
<solid android:color="#89aaaaaa" /> | |
</shape> | |
</item> | |
<!-- This rectangle for the left side --> | |
<!-- Its color should be the same as layout's background --> | |
<item | |
android:right="100dp" | |
android:left="-100dp" | |
android:top="-100dp" | |
android:bottom="-100dp"> | |
<rotate | |
android:fromDegrees="45"> | |
<shape android:shape="rectangle"> | |
<solid android:color="#ff30a3b6" /> | |
</shape> | |
</rotate> | |
</item> | |
<!-- This rectangle for the right side --> | |
<!-- Their color should be the same as layout's background --> | |
<item | |
android:right="-100dp" | |
android:left="100dp" | |
android:top="-100dp" | |
android:bottom="-100dp"> | |
<rotate | |
android:fromDegrees="45"> | |
<shape android:shape="rectangle"> | |
<solid android:color="#ff30a3b6" /> | |
</shape> | |
</rotate> | |
</item> | |
</selector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment