Skip to content

Commit

Permalink
Fixes#4184: Add dark mode support to ThirdPartyDependencyListActivity…
Browse files Browse the repository at this point in the history
…, LicenseListActivity and LicenseTextViewerActivity (#4289)

* removed Extra line

* Added dark mode support to ThirdPartyDependencyListActivity, LicenseListActivity and LicenseTextViewerActivity

* Added dark mode support to ThirdPartyDependencyListActivity, LicenseListActivity and LicenseTextViewerActivity

* updated the error in license text viewer activity

* updated the error in license text viewer activity

* removed the spaces in components file

* again added all components colors as misplaced due to merged conflicts

* updating

* added the divider lines

* added the divider lines in license item

* Updated with recent changes

* Correctly added the names for all the activity files dark mode colors

* added the space line
  • Loading branch information
aayushimathur6 authored May 27, 2022
1 parent 09b3ba1 commit 7d31a49
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/component_color_general_item_background_solid_color" />
<stroke
android:width="1dp"
android:color="@color/component_color_general_item_background_stroke_color" />
</shape>
5 changes: 3 additions & 2 deletions app/src/main/res/layout/license_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_def_white">
android:background="@drawable/general_item_background_border_black">

<TextView
android:id="@+id/license_name_text_view"
style="@style/Subtitle2ViewStart"
android:layout_width="match_parent"
android:background="@drawable/general_item_background_border"
android:background="@drawable/general_item_background_border_black"
android:fontFamily="sans-serif-smallcaps"
android:onClick="@{() -> viewModel.clickOnLicenseItem()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:textColor="@color/component_color_license_list_activity_license_name_text_view_color"
android:text="@{viewModel.licenseName}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/license_list_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/general_navigation_background"
android:background="@color/component_color_license_list_activity_background_color"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingBottom="@dimen/faq_list_scroll_padding_bottom"
Expand All @@ -25,7 +25,7 @@
android:id="@+id/license_list_fragment_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_license_list_activity_license_name_background_color"
android:clipToPadding="false"
android:nestedScrollingEnabled="false"
app:list="@{viewModel.licenseItemList}" />
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/license_text_viewer_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white">
android:background="@color/component_color_license_text_viewer_activity_background_color">

<TextView
android:id="@+id/copyright_license_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/general_item_background_border_black"
android:layout_gravity="center_horizontal"
android:autoLink="web"
android:padding="32dp"
android:textColor="@color/component_color_license_text_viewer_activity_text_color"
android:text="@{viewModel.licenseText}" />
</ScrollView>
</layout>
5 changes: 3 additions & 2 deletions app/src/main/res/layout/third_party_dependency_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/general_item_background_border"
android:background="@drawable/general_item_background_border_black"
android:onClick="@{(v) -> viewModel.clickOnThirdPartyDependencyItem()}"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -34,6 +34,7 @@
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:paddingBottom="4dp"
android:textColor="@color/component_color_third_party_dependency_list_activity_dependency_name_text_view_color"
android:text="@{viewModel.dependencyName}" />

<TextView
Expand All @@ -45,8 +46,8 @@
android:paddingTop="4dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp"
android:textColor="@color/color_def_accessible_grey"
android:text="@{viewModel.dependencyVersion}"
android:textColor="@color/component_color_third_party_dependency_list_activity_dependency_version_text_color"
android:textSize="12sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/general_navigation_background"
android:background="@color/component_color_third_party_dependency_list_activity_background_color"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingBottom="@dimen/faq_list_scroll_padding_bottom"
Expand All @@ -25,7 +25,7 @@
android:id="@+id/third_party_dependency_list_fragment_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_third_party_dependency_list_activity_background_color"
android:clipToPadding="false"
android:nestedScrollingEnabled="false"
app:list="@{viewModel.thirdPartyDependencyItemList}" />
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/res/values/component_colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<color name="component_color_shared_input_interaction_edit_text_text_color">@color/color_palette_primary_text_color</color>
<color name="component_color_shared_text_input_layout_background_color">@color/color_palette_text_input_background_color</color>
<color name="component_color_shared_text_input_layout_error_color">@color/color_palette_error_color</color>
<color name="component_color_general_item_background_solid_color">@color/color_palette_container_background_color</color>
<color name="component_color_general_item_background_stroke_color">@color/color_palette_dark_background_color</color>
<!-- Admin Auth Activity -->
<color name="component_color_admin_auth_secondary_text_color">@color/color_palette_description_text_color</color>
<color name="component_color_admin_auth_layout_background_color">@color/color_palette_background_color</color>
Expand Down Expand Up @@ -83,4 +85,15 @@
<color name="component_color_start_over_button_text_color">@color/color_palette_secondary_toolbar_color</color>
<color name="component_color_start_over_button_stroke_color">@color/color_palette_secondary_toolbar_color</color>
<color name="component_color_start_over_button_drawable_tint_color">@color/color_palette_secondary_toolbar_color</color>
<!-- Third Party Dependency List Activity -->
<color name="component_color_third_party_dependency_list_activity_background_color">@color/color_palette_dark_background_color</color>
<color name="component_color_third_party_dependency_list_activity_dependency_name_text_view_color">@color/color_palette_dark_text_color</color>
<color name="component_color_third_party_dependency_list_activity_dependency_version_text_color">@color/color_palette_primary_text_color</color>
<!-- License List Activity -->
<color name="component_color_license_list_activity_background_color">@color/color_palette_dark_background_color</color>
<color name="component_color_license_list_activity_license_name_background_color">@color/color_palette_container_background_color</color>
<color name="component_color_license_list_activity_license_name_text_view_color">@color/color_palette_dark_text_color</color>
<!-- License Text Viewer Activity -->
<color name="component_color_license_text_viewer_activity_background_color">@color/color_palette_dark_background_color</color>
<color name="component_color_license_text_viewer_activity_text_color">@color/color_palette_description_text_color</color>
</resources>

0 comments on commit 7d31a49

Please sign in to comment.