Android-NiceTab icon indicating copy to clipboard operation
Android-NiceTab copied to clipboard

SelectedTabColor is not changing color in Android 4.3

Open tvaamorim opened this issue 9 years ago • 3 comments

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

tvaamorim avatar Sep 04 '15 13:09 tvaamorim

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.

RobotAmiee avatar Sep 06 '15 05:09 RobotAmiee

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

tvaamorim avatar Sep 07 '15 01:09 tvaamorim

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

moktar avatar Oct 14 '15 07:10 moktar