Skip to content

Commit

Permalink
Fixed Part-2 #4200 : Added dark mode support to Alert Dialog Views #4415
Browse files Browse the repository at this point in the history
 (#4534)

* fixed text cut off

* fix text cutoff in all layouts

* add proper naming

* implement darkmode AudioLanguage,ReadingTextSize,AppLanguage Activities

* minor fixes

* develop updated

* minor changes

* fixed build error

* Tests Failed Fixed

* Update color_defs.xml

* added EOL

* alert dialog dark mode
  • Loading branch information
MohitGupta121 authored Aug 29, 2022
1 parent 36e7661 commit afdddba
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/src/main/res/layout/cellular_data_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="@dimen/cellular_data_dialog_padding"
android:paddingEnd="16dp"
android:paddingBottom="@dimen/cellular_data_dialog_padding"
android:text="@string/cellular_data_alert_dialog_checkbox"
android:textColor="@color/color_def_black_54"
android:textColor="@color/component_color_cellular_data_dialog_checkbox_color"
android:textSize="16sp" />
</RelativeLayout>
4 changes: 2 additions & 2 deletions app/src/main/res/layout/profile_picture_edit_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
android:paddingTop="24dp"
android:paddingBottom="12dp"
android:text="@string/profile_picture_edit_alert_dialog_view_profile_picture"
android:textColor="@color/color_def_black"
android:textColor="@color/component_color_profile_picture_edit_dialog_text_color"
android:textSize="16sp" />

<TextView
Expand All @@ -29,6 +29,6 @@
android:paddingTop="12dp"
android:paddingBottom="16dp"
android:text="@string/profile_picture_edit_alert_dialog_choose_from_library"
android:textColor="@color/color_def_black"
android:textColor="@color/component_color_profile_picture_edit_dialog_text_color"
android:textSize="16sp" />
</LinearLayout>
2 changes: 2 additions & 0 deletions app/src/main/res/values-v21/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
<item name="colorPrimary">@color/color_palette_primary_color</item>
<item name="colorPrimaryDark">@color/color_palette_primary_dark_color</item>
<item name="colorAccent">@color/color_palette_primary_color</item>
<item name="colorBackgroundFloating">@color/component_color_alert_dialog_background_color</item>
<item name="android:textColorPrimary">@color/component_color_alert_dialog_text_color</item>
<item name="android:buttonBarNegativeButtonStyle">@style/textAllCaps</item>
<item name="android:buttonBarPositiveButtonStyle">@style/textAllCaps</item>
</style>
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/values/component_colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,12 @@
<color name="component_color_reading_text_size_items_heading_text_color">@color/color_palette_dark_text_color</color>
<!-- App Language Activity -->
<color name="component_color_app_language_activity_background_color">@color/color_palette_dark_background_color</color>
<!-- Alerts Dialog Theme -->
<color name="component_color_alert_dialog_background_color">@color/color_palette_container_background_color</color>
<color name="component_color_alert_dialog_text_color">@color/color_palette_dark_text_color</color>
<!-- Cellular Data Dialog -->
<color name="component_color_cellular_data_dialog_checkbox_color">@color/color_palette_dark_text_color</color>
<!-- Profile Picture Edit Dialog -->
<color name="component_color_profile_picture_edit_dialog_text_color">@color/color_palette_dark_text_color</color>

</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

<style name="OppiaDialogFragmentTheme" parent="OppiaTheme">
<item name="colorAccent">@color/color_palette_primary_color</item>
<item name="colorBackgroundFloating">@color/component_color_alert_dialog_background_color</item>
<item name="android:textColorPrimary">@color/component_color_alert_dialog_text_color</item>
</style>

<style name="OppiaSwitchCompatTheme" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge">
Expand All @@ -38,6 +40,8 @@
<item name="colorPrimary">@color/color_palette_primary_color</item>
<item name="colorPrimaryDark">@color/color_palette_primary_dark_color</item>
<item name="colorAccent">@color/color_palette_primary_color</item>
<item name="colorBackgroundFloating">@color/component_color_alert_dialog_background_color</item>
<item name="android:textColorPrimary">@color/component_color_alert_dialog_text_color</item>
</style>

<style name="OppiaActionBarTheme" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" >
Expand Down

0 comments on commit afdddba

Please sign in to comment.