Skip to content

Commit

Permalink
change dialogs text styles
Browse files Browse the repository at this point in the history
  • Loading branch information
tsynik committed Nov 8, 2023
1 parent f6c9aac commit e11abea
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions app/src/main/res/color/text_color.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="?attr/colorAccent" android:alpha="0.5" /><!-- pressed -->
<item android:state_focused="true" android:color="?attr/colorAccent" android:alpha="1.0" /><!-- focused -->
<item android:color="?attr/colorBright" android:alpha="1.0"/><!-- default -->
</selector>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/app_list_title.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:focusable="true"
android:gravity="right|center_vertical|end"
android:minWidth="200dp"
Expand All @@ -34,5 +33,6 @@
android:textAllCaps="true"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="?attr/colorBright"
app:switchPadding="10dp" />
</LinearLayout>
12 changes: 6 additions & 6 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,17 @@
</style>
<!-- Checkboxes Text -->
<style name="Widget.App.CheckBox" parent="Widget.MaterialComponents.CompoundButton.CheckBox">
<item name="android:textColor">?attr/colorBright</item><!-- TODO: colorStateList -->
<item name="android:textColor">@color/text_color</item>
<item name="android:singleLine">true</item>
<item name="android:ellipsize">end</item>
</style>
<!-- RadioButton -->
<style name="Widget.App.RadioButton" parent="Widget.MaterialComponents.CompoundButton.RadioButton">
<item name="android:textColor">?attr/colorBright</item><!-- TODO: colorStateList -->
<item name="android:textColor">@color/text_color</item>
</style>
<!-- Switch -->
<style name="Widget.App.Switch" parent="Widget.MaterialComponents.CompoundButton.Switch">
<item name="android:textColor">?attr/colorBright</item><!-- TODO: colorStateList -->
<item name="android:textColor">@color/text_color</item>
<item name="android:textSize">16sp</item>
<item name="thumbTint">@color/thumb_color</item>
</style>
Expand All @@ -180,7 +180,8 @@
<!-- Used for the title -->
<item name="materialAlertDialogTitleTextStyle">@style/AlertTitleTextStyle</item>
<!-- Used for the text -->
<item name="android:textColorPrimary">@color/tv_white</item>
<!-- <item name="android:textColor">@color/text_color</item>-->
<item name="android:textColorPrimary">@color/text_color</item>
<!-- Set min width -->
<item name="windowMinWidthMajor">50%</item><!-- landscape -->
<item name="windowMinWidthMinor">70%</item><!-- portrait -->
Expand All @@ -197,9 +198,8 @@
<item name="android:windowBackground">@drawable/rc_background_light</item>
<item name="colorPrimary">@color/dark_brown</item>
<item name="colorAccent">@color/dark_brown</item>
<!-- Used for the checkboxes text -->
<item name="android:textColorPrimary">@color/dark_brown</item>
</style>
<!-- Dialog Black Style -->
<style name="AlertDialog.Black" parent="AlertDialog">
<item name="android:windowBackground">@drawable/rc_background_black</item>
<item name="colorPrimary">@color/green</item>
Expand Down

0 comments on commit e11abea

Please sign in to comment.