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

Fix checkbox tint #3312

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning ⚠️  
📚 The resource R.style.Widget_App_CheckBox appears to be unused
🛠️ UnusedResources

by Android Lint 🤖

<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
Loading