Skip to content

Commit

Permalink
Fix checkbox tint (#3312)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesSmartCell authored Sep 25, 2023
1 parent 9a6f79a commit 5211dc2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/color/selector_button_primary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?colorOnSurface" android:state_enabled="true" />
<item android:color="?colorOnSurface" android:alpha="0.3" android:state_enabled="false" />
</selector>
</selector>
5 changes: 5 additions & 0 deletions app/src/main/res/color/selector_button_tint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?colorAccent" android:state_checked="true"/>
<item android:alpha="0.38" android:color="?android:textColorPrimary" android:state_enabled="false"/>
<item android:color="?android:textColorPrimary"/>
</selector>
7 changes: 5 additions & 2 deletions app/src/main/res/layout/item_network_check.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"
app:useMaterialThemeColors="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:buttonTint="@color/selector_button_tint"
tools:checked="true" />

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
4 changes: 4 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@
<item name="android:textAppearance">@style/Aw.Typography</item>
</style>

<style name="Widget.App.CheckBox" parent="Widget.MaterialComponents.CompoundButton.CheckBox">
<item name="buttonTint">@color/selector_button_tint</item>
</style>

<style name="Aw.Component.Card" parent="">
<item name="android:background">@color/active_session_card_background</item>
</style>
Expand Down

0 comments on commit 5211dc2

Please sign in to comment.