Skip to content
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

SelectedTabColor is not changing color in Android 4.3 #3

Open
tvaamorim opened this issue Sep 4, 2015 · 3 comments
Open

SelectedTabColor is not changing color in Android 4.3 #3

tvaamorim opened this issue Sep 4, 2015 · 3 comments

Comments

@tvaamorim
Copy link

Hi,
I'm Testing my app in a Galaxy Nexus (Android 4.3) version and in a Nexus 5 (Android 5.1.1).
Everything is fine in the Nexus 5, but in the Galaxy Nexus the tabs didn't change color when the Pages changes, when the tab is clicked it changes, but the last selected tab didn't, if i click in all the tabs all will stay with the color selected.

I have to do something special so it can work int the old version?

<me.amiee.nicetab.NiceTabLayout android:id="@+id/main_tabs_slide" android:layout_width="match_parent" android:layout_height="48dp" android:layout_alignParentBottom="true" android:background="#F8F8F8" app:ntlTabDistributeEvenly="true" app:ntlDefaultTabColor="#B2B2B2" app:ntlDividerPaddingLeft="6dp" app:ntlDividerPaddingRight="6dp" app:ntlSelectedTabColor="?colorPrimary" app:ntlShowIndicator="false" app:ntlShowUnderline="true" app:ntlTabMode="iconOnly" />

If i change to app:ntlTabMode="both" it works again.

Thanks

@RobotAmiee
Copy link
Owner

hi, if you use source code in your project, a quick fix would be:

private void tintDrawable(Drawable drawable, int color) {
    if (mIconTint) {
        drawable.mutate().setColorFilter(color, PorterDuff.Mode.SRC_IN);
        //            drawable = DrawableCompat.wrap(drawable);
        //            DrawableCompat.setTint(drawable, color);
    }
}

in me.amiee.nicetab.NiceTabLayout.

I will upload a fixed version in next few days.

@tvaamorim
Copy link
Author

@RobotAmiee Thanks, I will wait for the new version.

@moktar
Copy link

moktar commented Oct 14, 2015

hi, tab set the color app theme but I don't this, I wanna to set another color so how could i change tab color

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants