jeudi 19 novembre 2015

Seperate Toolbar action menu style and Checkbox style

I saw that

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
   <item name="android:textColorSecondary">@android:color/white</item>

affects both menu ... text color (as in ... icon on the right) but also change the border of an unchecked checkbox. What I've been trying to do is to give them different colors. I tried to give a different style to checkbox but no luck.

<style name="Checkbox" parent="Widget.AppCompat.CompoundButton.CheckBox">
    <item name="android:textColorSecondary">@color/blue</item>
</style>

and

<CheckBox
            android:id="@+id/activitySettings_checkBox_announce"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:focusable="false"
            android:focusableInTouchMode="false"
            android:clickable="false"
            style="@style/Checkbox"/>

but seems impossible to give any style to the checkbox because it always use the activity's theme.




Aucun commentaire:

Enregistrer un commentaire