New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added function to change tab title/icon color when selected. #62
Conversation
These values should really be in a |
Thanks a lot!You solve my problem.And this is useful. |
Mr.Red. Your work saved me a lot of time. Thank You. |
Greate work, but i have problem because icon not change on selected tab. I see when i pressed tab it's changed icon but when i release finger from tab it show me not selected icon, but change me text color of tab. Any solution ? |
I think #83 implementation is cleaner |
lapastillaroja, but this is just for color change right ? What about icon change on selected tab too? |
@ferrarif248 <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/feed_selected"
android:state_selected="true" />
<item android:drawable="@drawable/feed_normal" />
</selector> |
I'v set in drawable selector_tab_1.xml like you wrote but didn't work. Do you maybe have some contact for chat ? if is not problem for you. |
Hello Guys, turns out that there is a better solution. res/color/btn
and here is where I use this resource in slideFragment.xml
|
can i set the custom tab width |
Good work!!, thanks a lot!!! |
Saved a lot of time!! Thanks a lot!!! |
I got "No resource identifier found for attribute 'pstsTabSwitch'" when use app:pstsTabSwitch="true" any suggestion ? |
This works great !! Thanks |
I got the same problem with @iamaunz ("No resource identifier found for attribute 'pstsTabSwitch'"). |
@camposbrunocampos did anyone confirm this ? because it's not work in my project |
Lava600
|
@rml-anh-nguyen @devabir93 @vietmh @iamaunz @EugeneHoran @abhijith-gururaj To change the color of the text is necessary to make drawable like and then apply to the property
Now the text color changes when the tab is active. In the description of the link has a lot of new properties |
Currently, only the interactive indicator can be modified in the tabs just like on the Google Play Store.
This modification allows selected tab title/icons to be of different color, making the interface more flexible and intuitive.
I added some functions in the library, and applied them on the sample.
library
I believe these additions will diversify the usage of this project, paving the way for a better interface.
Thank you for sharing a great open source.
Comments and suggestions are welcome!