From afd59eabbb5071b358f8dc04752788d73e4cc553 Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Sat, 22 May 2021 21:10:41 +0700 Subject: [PATCH] Remove material-design-dimens (#5133) --- app/build.gradle.kts | 1 - app/src/main/res/layout/categories_item.xml | 7 ++++--- .../res/layout/common_dialog_with_checkbox.xml | 2 +- app/src/main/res/layout/download_item.xml | 15 ++++++++------- .../res/layout/global_search_controller_card.xml | 8 ++++---- .../main/res/layout/navigation_view_checkbox.xml | 2 +- .../res/layout/navigation_view_checkedtext.xml | 2 +- .../main/res/layout/navigation_view_radio.xml | 2 +- app/src/main/res/layout/reader_activity.xml | 12 ++++++------ .../res/layout/reader_color_filter_settings.xml | 2 +- app/src/main/res/layout/section_header_item.xml | 6 ++---- app/src/main/res/layout/source_list_item.xml | 6 +++--- app/src/main/res/layout/updates_item.xml | 2 +- app/src/main/res/values-sw600dp/dimens.xml | 4 ++++ app/src/main/res/values/dimens.xml | 2 ++ app/src/main/res/values/styles.xml | 16 +++++----------- 16 files changed, 44 insertions(+), 45 deletions(-) create mode 100644 app/src/main/res/values-sw600dp/dimens.xml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 39f3d4a2e2..fdbc3ccb92 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -214,7 +214,6 @@ dependencies { implementation("com.github.gpanther:java-nat-sort:natural-comparator-1.1") // UI - implementation("com.dmitrymalkovich.android:material-design-dimens:1.4") implementation("com.github.dmytrodanylyk.android-process-button:library:1.0.4") implementation("eu.davidea:flexible-adapter:5.1.0") implementation("eu.davidea:flexible-adapter-ui:1.0.0") diff --git a/app/src/main/res/layout/categories_item.xml b/app/src/main/res/layout/categories_item.xml index 2bbd5b8d14..c5bf5edc3a 100644 --- a/app/src/main/res/layout/categories_item.xml +++ b/app/src/main/res/layout/categories_item.xml @@ -3,13 +3,14 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" + android:layout_height="56dp" android:background="@drawable/list_item_selector_background"> diff --git a/app/src/main/res/layout/download_item.xml b/app/src/main/res/layout/download_item.xml index bf8bfbe1e3..076ed5e152 100644 --- a/app/src/main/res/layout/download_item.xml +++ b/app/src/main/res/layout/download_item.xml @@ -4,14 +4,15 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingTop="@dimen/material_component_lists_padding_above_list"> + android:paddingTop="8dp"> diff --git a/app/src/main/res/layout/navigation_view_checkbox.xml b/app/src/main/res/layout/navigation_view_checkbox.xml index 6dfab038a5..2c36b7bf4c 100644 --- a/app/src/main/res/layout/navigation_view_checkbox.xml +++ b/app/src/main/res/layout/navigation_view_checkbox.xml @@ -16,7 +16,7 @@ android:clickable="false" android:gravity="center_vertical|start" android:maxLines="1" - android:paddingStart="@dimen/material_component_lists_icon_left_padding" + android:paddingHorizontal="16dp" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> diff --git a/app/src/main/res/layout/navigation_view_checkedtext.xml b/app/src/main/res/layout/navigation_view_checkedtext.xml index 250a9fcf5a..51243946cc 100644 --- a/app/src/main/res/layout/navigation_view_checkedtext.xml +++ b/app/src/main/res/layout/navigation_view_checkedtext.xml @@ -12,7 +12,7 @@ android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" - android:drawablePadding="@dimen/material_component_lists_icon_left_padding" + android:drawablePadding="16dp" android:gravity="center_vertical|start" android:maxLines="1" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> diff --git a/app/src/main/res/layout/navigation_view_radio.xml b/app/src/main/res/layout/navigation_view_radio.xml index 8e12019985..7ac1d6687f 100644 --- a/app/src/main/res/layout/navigation_view_radio.xml +++ b/app/src/main/res/layout/navigation_view_radio.xml @@ -16,7 +16,7 @@ android:clickable="false" android:gravity="center_vertical|start" android:maxLines="1" - android:paddingStart="@dimen/material_component_lists_icon_left_padding" + android:paddingHorizontal="16dp" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> diff --git a/app/src/main/res/layout/reader_activity.xml b/app/src/main/res/layout/reader_activity.xml index 273760a495..e2c616202d 100644 --- a/app/src/main/res/layout/reader_activity.xml +++ b/app/src/main/res/layout/reader_activity.xml @@ -88,7 +88,7 @@ android:layout_marginEnd="8dp" android:background="@drawable/reader_seekbar_button" android:contentDescription="@string/action_previous_chapter" - android:padding="@dimen/material_layout_keylines_screen_edge_margin" + android:padding="@dimen/screen_edge_margin" app:srcCompat="@drawable/ic_skip_previous_24dp" app:tint="?attr/colorOnPrimary" /> @@ -140,7 +140,7 @@ android:layout_marginStart="8dp" android:background="@drawable/reader_seekbar_button" android:contentDescription="@string/action_next_chapter" - android:padding="@dimen/material_layout_keylines_screen_edge_margin" + android:padding="@dimen/screen_edge_margin" app:srcCompat="@drawable/ic_skip_next_24dp" app:tint="?attr/colorOnPrimary" /> @@ -158,7 +158,7 @@ android:layout_height="match_parent" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/viewer" - android:padding="@dimen/material_layout_keylines_screen_edge_margin" + android:padding="@dimen/screen_edge_margin" app:layout_constraintEnd_toStartOf="@id/action_crop_borders" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" @@ -171,7 +171,7 @@ android:layout_height="match_parent" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/pref_crop_borders" - android:padding="@dimen/material_layout_keylines_screen_edge_margin" + android:padding="@dimen/screen_edge_margin" app:layout_constraintEnd_toStartOf="@id/action_rotation" app:layout_constraintStart_toEndOf="@+id/action_reading_mode" app:layout_constraintTop_toTopOf="parent" @@ -184,7 +184,7 @@ android:layout_height="match_parent" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/pref_rotation_type" - android:padding="@dimen/material_layout_keylines_screen_edge_margin" + android:padding="@dimen/screen_edge_margin" app:layout_constraintEnd_toStartOf="@id/action_settings" app:layout_constraintStart_toEndOf="@+id/action_crop_borders" app:layout_constraintTop_toTopOf="parent" @@ -197,7 +197,7 @@ android:layout_height="match_parent" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/action_settings" - android:padding="@dimen/material_layout_keylines_screen_edge_margin" + android:padding="@dimen/screen_edge_margin" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/action_rotation" app:layout_constraintTop_toTopOf="parent" diff --git a/app/src/main/res/layout/reader_color_filter_settings.xml b/app/src/main/res/layout/reader_color_filter_settings.xml index 9701574f71..65288cddf2 100644 --- a/app/src/main/res/layout/reader_color_filter_settings.xml +++ b/app/src/main/res/layout/reader_color_filter_settings.xml @@ -225,7 +225,7 @@ android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" - android:padding="@dimen/material_component_text_fields_floating_label_padding_between_label_and_input_text" + android:padding="8dp" app:layout_constraintEnd_toStartOf="@id/txt_brightness_seekbar_value" app:layout_constraintStart_toEndOf="@id/txt_brightness_seekbar_icon" app:layout_constraintTop_toBottomOf="@id/custom_brightness" diff --git a/app/src/main/res/layout/section_header_item.xml b/app/src/main/res/layout/section_header_item.xml index 0e36518558..45eba41e82 100644 --- a/app/src/main/res/layout/section_header_item.xml +++ b/app/src/main/res/layout/section_header_item.xml @@ -9,10 +9,8 @@ style="@style/TextAppearance.Medium.SubHeading" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingStart="@dimen/material_component_text_fields_padding_above_and_below_label" - android:paddingTop="8dp" - android:paddingEnd="@dimen/material_component_text_fields_padding_above_and_below_label" - android:paddingBottom="8dp" + android:paddingHorizontal="16dp" + android:paddingVertical="8dp" tools:text="Title" /> diff --git a/app/src/main/res/layout/source_list_item.xml b/app/src/main/res/layout/source_list_item.xml index 63c1272db9..e25d6019dd 100644 --- a/app/src/main/res/layout/source_list_item.xml +++ b/app/src/main/res/layout/source_list_item.xml @@ -3,7 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" + android:layout_height="56dp" android:layout_gravity="center_vertical" android:background="@drawable/list_item_selector_background" android:paddingStart="8dp" @@ -11,8 +11,8 @@ diff --git a/app/src/main/res/values-sw600dp/dimens.xml b/app/src/main/res/values-sw600dp/dimens.xml new file mode 100644 index 0000000000..fc0bcc36e2 --- /dev/null +++ b/app/src/main/res/values-sw600dp/dimens.xml @@ -0,0 +1,4 @@ + + + 24dp + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index c9b5a656f4..dabe27907b 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -12,4 +12,6 @@ 88dp 72dp + + 16dp diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 17b2831a19..419959c6ef 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -177,17 +177,11 @@