Tint Checkbox And Toolbar Stuff Separately
I'm currently using the usually amazing appcompat-v7 library in my application and I'm trying to tint my CheckBoxes without changing the Icon-Colors in the Toolbar (like the back a
Solution 1:
You're basically facing the same issue as described in this or this question.
So the only thing you need to do is to create a Style
for your Toolbar
which uses an other theme as the Activity
.
Toolbar style / theme example
<stylename="MyToolbarStyle"><!-- potential other attributes --><itemname="theme">@style/MyToolbarTheme</item></style><stylename="MyToolbarTheme"><!-- Used to tint the back arrow, menu and spinner arrow --><itemname="colorControlNormal">#FFF</item></style>
Add this Style to your Toolbar and your issue should be fixed (it is important not to use the theme directly):
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/MyToolbarStyle"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="?colorPrimary"
android:elevation="4dp" />
Post a Comment for "Tint Checkbox And Toolbar Stuff Separately"