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 Part of #4883 : Remove exempted file from Kotlin and Xml Regex components colors checks #4942

Merged
merged 5 commits into from
Apr 15, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class AddProfileActivityPresenter @Inject constructor(
uploadImageView.setColorFilter(
ResourcesCompat.getColor(
activity.resources,
R.color.color_def_avatar_background_11,
R.color.component_color_avatar_background_11_color,
null
),
PorterDuff.Mode.DST_OVER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,30 @@ import org.oppia.android.util.statusbar.StatusBarColor
import javax.inject.Inject

private val COLORS_LIST = listOf(
R.color.color_def_avatar_background_1,
R.color.color_def_avatar_background_2,
R.color.color_def_avatar_background_3,
R.color.color_def_avatar_background_4,
R.color.color_def_avatar_background_5,
R.color.color_def_avatar_background_6,
R.color.color_def_avatar_background_7,
R.color.color_def_avatar_background_8,
R.color.color_def_avatar_background_9,
R.color.color_def_avatar_background_10,
R.color.color_def_avatar_background_11,
R.color.color_def_avatar_background_12,
R.color.color_def_avatar_background_13,
R.color.color_def_avatar_background_14,
R.color.color_def_avatar_background_15,
R.color.color_def_avatar_background_16,
R.color.color_def_avatar_background_17,
R.color.color_def_avatar_background_18,
R.color.color_def_avatar_background_19,
R.color.color_def_avatar_background_20,
R.color.color_def_avatar_background_21,
R.color.color_def_avatar_background_22,
R.color.color_def_avatar_background_23,
R.color.color_def_avatar_background_24
R.color.component_color_avatar_background_1_color,
R.color.component_color_avatar_background_2_color,
R.color.component_color_avatar_background_3_color,
R.color.component_color_avatar_background_4_color,
R.color.component_color_avatar_background_5_color,
R.color.component_color_avatar_background_6_color,
R.color.component_color_avatar_background_7_color,
R.color.component_color_avatar_background_8_color,
R.color.component_color_avatar_background_9_color,
R.color.component_color_avatar_background_10_color,
R.color.component_color_avatar_background_11_color,
R.color.component_color_avatar_background_12_color,
R.color.component_color_avatar_background_13_color,
R.color.component_color_avatar_background_14_color,
R.color.component_color_avatar_background_15_color,
R.color.component_color_avatar_background_16_color,
R.color.component_color_avatar_background_17_color,
R.color.component_color_avatar_background_18_color,
R.color.component_color_avatar_background_19_color,
R.color.component_color_avatar_background_20_color,
R.color.component_color_avatar_background_21_color,
R.color.component_color_avatar_background_22_color,
R.color.component_color_avatar_background_23_color,
R.color.component_color_avatar_background_24_color
)

/** The presenter for [ProfileChooserFragment]. */
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout-land/onboarding_slide_final.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
android:layout_marginTop="16dp"
android:layout_marginEnd="40dp"
android:text="@string/onboarding_slide_3_description"
android:textColor="@color/color_palette_secondary_1_text_color"
android:textColor="@color/component_color_shared_secondary_1_text_color"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/slide_image_view"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
android:layout_width="0dp"
android:layout_marginTop="12dp"
android:text="@string/onboarding_slide_3_description"
android:textColor="@color/color_palette_secondary_1_text_color"
android:textColor="@color/component_color_shared_secondary_1_text_color"
android:textSize="24sp"
app:layout_constraintEnd_toStartOf="@+id/guideline3"
app:layout_constraintStart_toStartOf="@+id/guideline4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
android:maxLines="2"
android:minLines="2"
android:text="@string/onboarding_slide_3_description"
android:textColor="@color/color_palette_secondary_1_text_color"
android:textColor="@color/component_color_shared_secondary_1_text_color"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_palette_tertiary_background_color">
android:background="@color/component_color_shared_screen_tertiary_background_color">

<FrameLayout
android:layout_width="0dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
android:layout_margin="8dp"
android:onClick="getPendingAnswerErrorOnSubmitClick"
android:text="Submit"
android:textColor="@color/color_def_white" />
android:textColor="@color/component_color_shared_secondary_4_text_color" />
</LinearLayout>
</ScrollView>
</layout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/add_profile_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/add_profile_pin_checkbox_margin_top"
android:buttonTint="@color/shared_checkbox_selector"
android:buttonTint="@color/component_color_shared_checkbox_selector"
android:minHeight="48dp"
android:text="@string/add_profile_create_a_3_digit_pin"
android:textColor="@color/component_color_shared_secondary_1_text_color"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/beta_notice_dialog_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:buttonTint="@color/shared_checkbox_selector"
android:buttonTint="@color/component_color_shared_checkbox_selector"
android:fontFamily="sans-serif"
android:minHeight="48dp"
android:text="@string/beta_notice_dialog_do_not_show_again_text"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/cellular_data_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:id="@+id/cellular_data_dialog_checkbox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:buttonTint="@color/shared_checkbox_selector"
android:buttonTint="@color/component_color_shared_checkbox_selector"
android:fontFamily="sans-serif"
android:paddingStart="16dp"
android:paddingTop="@dimen/cellular_data_dialog_padding"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/coming_soon_topic_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
android:paddingBottom="6dp"
android:text="@string/coming_soon"
android:textAllCaps="true"
android:textColor="@color/color_def_white"
android:textColor="@color/component_color_shared_secondary_4_text_color"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down Expand Up @@ -77,7 +77,7 @@
android:maxLines="2"
android:minLines="2"
android:text="@{viewModel.topicTitle}"
android:textColor="@color/color_def_white"
android:textColor="@color/component_color_shared_secondary_4_text_color"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -92,7 +92,7 @@
android:layout_marginEnd="8dp"
android:fontFamily="sans-serif-light"
android:paddingBottom="8dp"
android:textColor="@color/color_def_white_80"
android:textColor="@color/component_color_shared_secondary_4_text_color"
android:textSize="14sp"
android:textStyle="italic"
app:layout_constraintStart_toStartOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/concept_card_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
app:layout_constraintTop_toTopOf="parent"
app:title="@string/concept_card_toolbar_title"
app:titleTextAppearance="@style/ToolbarTextAppearance"
app:titleTextColor="@color/color_def_white" />
app:titleTextColor="@color/component_color_shared_activity_toolbar_text_color" />

<FrameLayout
android:layout_width="0dp"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/drawer_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
android:scrollbars="none"
app:elevation="0dp"
android:background="@color/component_color_shared_fragment_container_background_color"
app:itemIconTint="@color/drawer_item"
app:itemTextColor="@color/drawer_item"
app:itemIconTint="@color/component_color_shared_drawer_item"
app:itemTextColor="@color/component_color_shared_drawer_item"
app:menu="@menu/navigation_drawer_menu" />

<LinearLayout
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/exploration_test_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_shared_white_background_color"
android:gravity="center"
android:orientation="vertical">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:buttonTint="@color/shared_checkbox_selector"
android:buttonTint="@color/component_color_shared_checkbox_selector"
android:fontFamily="sans-serif"
android:minHeight="48dp"
android:text="@string/general_availability_notice_dialog_do_not_show_again_text"
Expand Down
11 changes: 5 additions & 6 deletions app/src/main/res/layout/hints_and_solution_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white">
android:layout_height="match_parent">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/hints_and_solution_app_bar_layout"
Expand All @@ -28,12 +27,12 @@
android:id="@+id/hints_and_solution_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_def_oppia_dark_blue"
android:background="@color/component_color_hints_and_solutions_fragment_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
app:title="@string/hints_toolbar_title"
app:titleTextAppearance="@style/ToolbarTextAppearance"
app:titleTextColor="@color/color_def_white" />
app:titleTextColor="@color/component_color_shared_activity_toolbar_text_color" />
</com.google.android.material.appbar.AppBarLayout>

<FrameLayout
Expand All @@ -54,12 +53,12 @@
android:paddingTop="@dimen/hints_and_solution_recycler_view_padding_top"
android:paddingBottom="@dimen/hints_and_solution_recycler_view_padding_bottom"
android:scrollbars="none"
app:list="@{viewModel.itemList}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/hints_and_solution_shadow_view" />
app:layout_constraintTop_toBottomOf="@id/hints_and_solution_shadow_view"
app:list="@{viewModel.itemList}" />

<View
android:id="@+id/hints_and_solution_shadow_view"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/home_test_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_shared_white_background_color"
android:gravity="center"
android:orientation="vertical">
</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
android:id="@+id/mark_chapters_completed_chapter_check_box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:buttonTint="@color/shared_checkbox_selector"
android:buttonTint="@color/component_color_shared_checkbox_selector"
android:checked="@{isChapterChecked}"
android:drawablePadding="20dp"
android:enabled="@{isChapterCheckboxEnabled}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:title="@string/developer_options_mark_chapters_completed"
app:titleTextAppearance="@style/ToolbarTextAppearance"
app:titleTextColor="@color/color_def_white" />
app:titleTextColor="@color/component_color_shared_activity_toolbar_text_color" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
android:id="@+id/mark_stories_completed_story_check_box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:buttonTint="@color/shared_checkbox_selector"
android:buttonTint="@color/component_color_shared_checkbox_selector"
android:checked="@{isStoryChecked}"
android:drawablePadding="20dp"
android:fontFamily="sans-serif"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:id="@+id/mark_topics_completed_fragment_root_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white">
android:background="@color/component_color_shared_white_background_color">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/mark_topics_completed_app_bar_layout"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
android:id="@+id/mark_topics_completed_topic_check_box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:buttonTint="@color/shared_checkbox_selector"
android:buttonTint="@color/component_color_shared_checkbox_selector"
android:checked="@{isTopicChecked}"
android:drawablePadding="20dp"
android:fontFamily="sans-serif"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
android:clickable="false"
android:focusable="false"
android:labelFor="@id/multiple_choice_content_text_view"
app:buttonTint="@color/shared_interaction_selector" />
app:buttonTint="@color/component_color_shared_shared_interaction_selector" />

<TextView
android:id="@+id/multiple_choice_content_text_view"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/my_downloads_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
android:textSize="14sp"
app:tabBackground="@color/component_color_shared_activity_toolbar_color"
app:tabGravity="fill"
app:tabIconTint="@color/tab_icon_color_selector"
app:tabIconTint="@color/component_color_shared_tab_icon_color_selector"
app:tabIndicatorColor="@android:color/white"
app:tabIndicatorHeight="2dp"
app:tabMode="fixed"
app:tabTextAppearance="@style/AppTabTextAppearance"
app:tabTextColor="@color/tab_icon_color_selector" />
app:tabTextColor="@color/component_color_shared_tab_icon_color_selector" />
</com.google.android.material.appbar.AppBarLayout>

<FrameLayout
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/onboarding_slide_final.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
android:maxLines="2"
android:minLines="2"
android:text="@string/onboarding_slide_3_description"
android:textColor="@color/color_palette_secondary_1_text_color"
android:textColor="@color/component_color_shared_secondary_1_text_color"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/slide_title_text_view" />
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/profile_list_device_id_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{viewModel.computeDeviceIdLabel(viewModel.deviceId)}"
android:textColor="@color/color_def_black"
android:textColor="@color/component_color_shared_primary_dark_text_color"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintHorizontal_weight="2"
app:layout_constraintTop_toTopOf="parent"
Expand All @@ -41,7 +41,7 @@
app:iconGravity="top"
app:iconSize="24dp"
app:iconTint="@color/component_color_profile_and_device_id_activity_enabled_icon_button_color"
app:backgroundTint="@color/color_def_white"
app:backgroundTint="@color/component_color_shared_white_background_color"
app:layout_constraintStart_toEndOf="@+id/device_id_label"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/profile_list_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<FrameLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/color_palette_tertiary_background_color"
android:background="@color/component_color_shared_screen_tertiary_background_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/profile_list_learner_id_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
android:onClick="@{(v) -> viewModel.copyLearnerId()}"
android:text="@{viewModel.currentCopiedId == viewModel.profile.learnerId ? @string/learner_analytics_copied_to_clipboard_label : @string/learner_analytics_copy_to_clipboard_label}"
android:textColor="@{viewModel.profile.learnerId.isEmpty() ? @color/component_color_profile_and_device_id_activity_disabled_icon_button_color : @color/component_color_profile_and_device_id_activity_enabled_icon_button_color}"
app:backgroundTint="@color/color_def_white"
app:backgroundTint="@color/component_color_shared_white_background_color"
app:icon="@{viewModel.currentCopiedId == viewModel.profile.learnerId ? @drawable/ic_baseline_check_24 : @drawable/ic_baseline_content_copy_24}"
app:iconGravity="top"
app:iconSize="24dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/profile_picture_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:title="@string/profile_picture_activity_title"
app:titleTextAppearance="@style/ToolbarTextAppearance"
app:titleTextColor="@color/color_def_white" />
app:titleTextColor="@color/component_color_shared_activity_toolbar_text_color" />
</com.google.android.material.appbar.AppBarLayout>

<ImageView
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/profile_reset_pin_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white">
android:background="@color/component_color_shared_white_background_color">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/profile_reset_pin_app_bar_layout"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/splash_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
android:text="@{isOnAlphaFlavor ? @string/splash_screen_alpha_label : isOnBetaFlavor ? @string/splash_screen_beta_label : @string/splash_screen_developer_label}"
style="@style/Heading2ViewStart"
android:textSize="24sp"
android:textColor="@color/color_def_white"
android:textColor="@color/component_color_shared_secondary_4_text_color"
android:visibility="@{(isOnDeveloperFlavor || isOnAlphaFlavor || isOnBetaFlavor) ? View.VISIBLE : View.GONE}"
app:layout_constraintEnd_toEndOf="@+id/splash_oppia_logo"
app:layout_constraintTop_toBottomOf="@+id/splash_oppia_logo" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:fontFamily="sans-serif-medium"
android:text="@string/select_a_topic_to_start"
android:padding="10dp"
android:background="@color/color_def_oppia_stroke_blue"
android:background="@color/component_color_test_margin_bindable_adapter_activity_background_color"
android:textColor="@color/component_color_shared_primary_text_color"
android:textSize="18sp" />
</FrameLayout>
Expand Down
Loading