Skip to content

Commit

Permalink
Enforce darkmode
Browse files Browse the repository at this point in the history
  • Loading branch information
adhiamboperes committed Feb 13, 2024
1 parent e24d9b1 commit db6490e
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ VIEW_MODELS_WITH_RESOURCE_IMPORTS = [
"src/main/java/org/oppia/android/app/home/topiclist/TopicSummaryViewModel.kt",
"src/main/java/org/oppia/android/app/onboarding/OnboadingSlideViewModel.kt",
"src/main/java/org/oppia/android/app/onboarding/OnboardingViewModel.kt",
"src/main/java/org/oppia/android/app/onboarding/onboardingv2/CreateLearnerProfileViewModel.kt",
"src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicItemViewModel.kt",
"src/main/java/org/oppia/android/app/options/OptionsReadingTextSizeViewModel.kt",
"src/main/java/org/oppia/android/app/options/TextSizeItemViewModel.kt",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="4dp" />
<solid android:color="@color/component_color_shared_white_background_color" />
<stroke
android:width="1dp"
android:color="@color/component_color_edittext_stroke_color" />
</shape>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="4dp" />
<solid android:color="@color/component_color_onboarding_shared_white_color" />
</shape>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<item android:right="1dp" android:bottom="3dp" android:left="1dp">
<shape android:shape="rectangle">
<solid android:color="@color/component_color_shared_secondary_button_background_trim_color" />
<solid android:color="@color/component_color_onboarding_shared_green_color" />
<corners android:radius="@dimen/survey_shared_corner_radius" />
</shape>
</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
android:layout_marginBottom="@dimen/onboarding_shared_margin_large"
android:fontFamily="sans-serif"
android:text="@string/audio_language_fragment_text"
android:textColor="@color/component_color_shared_primary_text_color"
android:textColor="@color/component_color_onboarding_shared_text_color"
android:textSize="@dimen/onboarding_shared_text_size_medium_large"
app:layout_constraintBottom_toTopOf="@id/audio_language_subtitle"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/create_profile_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
android:layout_marginTop="@dimen/onboarding_shared_margin_small"
android:layout_marginEnd="@dimen/onboarding_shared_margin_medium_large"
android:autofillHints="false"
android:background="@{viewModel.hasName ? @drawable/edit_text_background_border: @drawable/edit_text_error_border}"
android:background="@{viewModel.hasName ? @drawable/edit_text_white_background_with_border: @drawable/edit_text_error_border}"
android:fontFamily="sans-serif"
android:inputType="text|textCapSentences"
android:imeOptions="actionDone"
Expand All @@ -127,6 +127,7 @@
android:paddingEnd="@dimen/onboarding_shared_padding_medium"
android:paddingBottom="@dimen/onboarding_shared_padding_medium_small"
android:textSize="@dimen/onboarding_shared_text_size_medium"
android:textColor="@color/component_color_onboarding_shared_text_color"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/create_profile_nickname_label"
tools:text="John" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/onboarding_shared_margin_medium"
android:background="@drawable/rounded_rect_white_background"
android:background="@drawable/onboarding_back_button_white_background"
android:fontFamily="sans-serif-medium"
android:gravity="center"
android:minWidth="@dimen/clickable_item_min_width"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-night/color_palette.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,6 @@
<color name="color_palette_onboarding_primary_text_color">@color/color_def_accessible_grey</color>
<color name="color_palette_onboarding_learner_intro_background_color">@color/color_def_highlight_blue_darker</color>
<color name="color_palette_onboarding_profile_type_background_color">@color/color_def_jade</color>

<color name="color_palette_edittext_stroke_color">@color/color_def_accessible_light_grey_2</color>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/color_palette.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,5 @@
<color name="color_palette_onboarding_profile_type_background_color">@color/color_def_jade</color>
<color name="color_palette_onboarding_edit_icon_color">@color/color_def_persian_green</color>

<color name="color_palette_edittext_stroke_color">@color/color_def_accessible_light_grey_2</color>
</resources>
4 changes: 3 additions & 1 deletion app/src/main/res/values/component_colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@
<color name="component_color_onboarding_shared_white_color">@color/color_palette_white_text_color</color>
<color name="component_color_onboarding_shared_green_color">@color/color_palette_onboarding_primary_color</color>
<color name="component_color_onboarding_shared_black_color">@color/color_palette_onboarding_black_color</color>
<color name="component_color_onboarding_shared_text_color">@color/color_palette_primary_text_color</color>
<color name="component_color_onboarding_shared_text_color">@color/color_palette_onboarding_primary_text_color</color>
<color name="component_color_onboarding_learner_intro_background_color">@color/color_palette_onboarding_learner_intro_background_color</color>
<color name="component_color_onboarding_profile_type_background_color">@color/color_palette_onboarding_profile_type_background_color</color>
<color name="component_color_onboarding_profile_edit_icon_color">@color/color_palette_onboarding_edit_icon_color</color>

<color name="component_color_edittext_stroke_color">@color/color_palette_edittext_stroke_color</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@
<style name="AudioLanguageSubtitleStyle" parent="TextViewCenterHorizontal">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/component_color_shared_primary_text_color</item>
<item name="android:textColor">@color/component_color_onboarding_shared_text_color</item>
<item name="android:layout_margin">@dimen/onboarding_shared_margin_medium_large</item>
<item name="android:textSize">@dimen/onboarding_shared_text_size_xl</item>
<item name="android:fontFamily">sans-serif-medium</item>
Expand Down

0 comments on commit db6490e

Please sign in to comment.