Remove material-design-dimens (#5133)

This commit is contained in:
Ivan Iskandar 2021-05-22 21:10:41 +07:00 committed by GitHub
parent cf99446a12
commit afd59eabbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 44 additions and 45 deletions

View file

@ -214,7 +214,6 @@ dependencies {
implementation("com.github.gpanther:java-nat-sort:natural-comparator-1.1") implementation("com.github.gpanther:java-nat-sort:natural-comparator-1.1")
// UI // UI
implementation("com.dmitrymalkovich.android:material-design-dimens:1.4")
implementation("com.github.dmytrodanylyk.android-process-button:library:1.0.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:5.1.0")
implementation("eu.davidea:flexible-adapter-ui:1.0.0") implementation("eu.davidea:flexible-adapter-ui:1.0.0")

View file

@ -3,13 +3,14 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" 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"> android:background="@drawable/list_item_selector_background">
<ImageView <ImageView
android:id="@+id/reorder" android:id="@+id/reorder"
android:layout_width="@dimen/material_component_lists_single_line_with_avatar_height" android:layout_width="wrap_content"
android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" android:layout_height="wrap_content"
android:padding="16dp"
android:scaleType="center" android:scaleType="center"
app:srcCompat="@drawable/ic_drag_handle_24dp" app:srcCompat="@drawable/ic_drag_handle_24dp"
app:tint="?android:attr/textColorHint" app:tint="?android:attr/textColorHint"

View file

@ -15,7 +15,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="-5dp" android:layout_marginStart="-5dp"
android:layout_marginTop="@dimen/material_component_dialogs_padding_between_text_and_touch_target" android:layout_marginTop="24dp"
android:layout_marginEnd="0dp" /> android:layout_marginEnd="0dp" />
</LinearLayout> </LinearLayout>

View file

@ -4,14 +4,15 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/material_component_lists_padding_above_list"> android:paddingTop="8dp">
<ImageView <ImageView
android:id="@+id/reorder" android:id="@+id/reorder"
android:layout_width="@dimen/material_component_lists_single_line_with_avatar_height" android:layout_width="wrap_content"
android:layout_height="0dp" android:layout_height="wrap_content"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_gravity="start" android:layout_gravity="start"
android:padding="16dp"
android:scaleType="center" android:scaleType="center"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -85,13 +86,13 @@
<ImageButton <ImageButton
android:id="@+id/menu" android:id="@+id/menu"
android:layout_width="44dp" android:layout_width="wrap_content"
android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" android:layout_height="wrap_content"
android:layout_toEndOf="@id/download_progress_text" android:layout_toEndOf="@id/download_progress_text"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/action_menu" android:contentDescription="@string/action_menu"
android:paddingStart="10dp" android:paddingVertical="16dp"
android:paddingEnd="10dp" android:paddingHorizontal="10dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"

View file

@ -46,7 +46,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:contentDescription="@string/label_more" android:contentDescription="@string/label_more"
android:padding="@dimen/material_component_text_fields_padding_above_and_below_label" android:padding="16dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@ -59,9 +59,9 @@
android:id="@+id/no_results_found" android:id="@+id/no_results_found"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="@dimen/material_component_text_fields_padding_above_and_below_label" android:paddingStart="16dp"
android:paddingEnd="@dimen/material_component_text_fields_padding_above_and_below_label" android:paddingEnd="16dp"
android:paddingBottom="@dimen/material_component_text_fields_padding_above_and_below_label" android:paddingBottom="16dp"
android:text="@string/no_results_found" android:text="@string/no_results_found"
android:visibility="gone" /> android:visibility="gone" />

View file

@ -16,7 +16,7 @@
android:clickable="false" android:clickable="false"
android:gravity="center_vertical|start" android:gravity="center_vertical|start"
android:maxLines="1" android:maxLines="1"
android:paddingStart="@dimen/material_component_lists_icon_left_padding" android:paddingHorizontal="16dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
</LinearLayout> </LinearLayout>

View file

@ -12,7 +12,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:drawablePadding="@dimen/material_component_lists_icon_left_padding" android:drawablePadding="16dp"
android:gravity="center_vertical|start" android:gravity="center_vertical|start"
android:maxLines="1" android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> android:textAppearance="@style/TextAppearance.AppCompat.Body1" />

View file

@ -16,7 +16,7 @@
android:clickable="false" android:clickable="false"
android:gravity="center_vertical|start" android:gravity="center_vertical|start"
android:maxLines="1" android:maxLines="1"
android:paddingStart="@dimen/material_component_lists_icon_left_padding" android:paddingHorizontal="16dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
</LinearLayout> </LinearLayout>

View file

@ -88,7 +88,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:background="@drawable/reader_seekbar_button" android:background="@drawable/reader_seekbar_button"
android:contentDescription="@string/action_previous_chapter" 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:srcCompat="@drawable/ic_skip_previous_24dp"
app:tint="?attr/colorOnPrimary" /> app:tint="?attr/colorOnPrimary" />
@ -140,7 +140,7 @@
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:background="@drawable/reader_seekbar_button" android:background="@drawable/reader_seekbar_button"
android:contentDescription="@string/action_next_chapter" 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:srcCompat="@drawable/ic_skip_next_24dp"
app:tint="?attr/colorOnPrimary" /> app:tint="?attr/colorOnPrimary" />
@ -158,7 +158,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/viewer" 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_constraintEnd_toStartOf="@id/action_crop_borders"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@ -171,7 +171,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/pref_crop_borders" 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_constraintEnd_toStartOf="@id/action_rotation"
app:layout_constraintStart_toEndOf="@+id/action_reading_mode" app:layout_constraintStart_toEndOf="@+id/action_reading_mode"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@ -184,7 +184,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/pref_rotation_type" 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_constraintEnd_toStartOf="@id/action_settings"
app:layout_constraintStart_toEndOf="@+id/action_crop_borders" app:layout_constraintStart_toEndOf="@+id/action_crop_borders"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@ -197,7 +197,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?selectableItemBackgroundBorderless" android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/action_settings" 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_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/action_rotation" app:layout_constraintStart_toEndOf="@id/action_rotation"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"

View file

@ -225,7 +225,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginEnd="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_constraintEnd_toStartOf="@id/txt_brightness_seekbar_value"
app:layout_constraintStart_toEndOf="@id/txt_brightness_seekbar_icon" app:layout_constraintStart_toEndOf="@id/txt_brightness_seekbar_icon"
app:layout_constraintTop_toBottomOf="@id/custom_brightness" app:layout_constraintTop_toBottomOf="@id/custom_brightness"

View file

@ -9,10 +9,8 @@
style="@style/TextAppearance.Medium.SubHeading" style="@style/TextAppearance.Medium.SubHeading"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="@dimen/material_component_text_fields_padding_above_and_below_label" android:paddingHorizontal="16dp"
android:paddingTop="8dp" android:paddingVertical="8dp"
android:paddingEnd="@dimen/material_component_text_fields_padding_above_and_below_label"
android:paddingBottom="8dp"
tools:text="Title" /> tools:text="Title" />
</FrameLayout> </FrameLayout>

View file

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" 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:layout_gravity="center_vertical"
android:background="@drawable/list_item_selector_background" android:background="@drawable/list_item_selector_background"
android:paddingStart="8dp" android:paddingStart="8dp"
@ -11,8 +11,8 @@
<ImageView <ImageView
android:id="@+id/thumbnail" android:id="@+id/thumbnail"
android:layout_width="@dimen/material_component_lists_single_line_with_avatar_height" android:layout_width="56dp"
android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" android:layout_height="56dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:padding="8dp" android:padding="8dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"

View file

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/material_component_lists_two_line_height" android:layout_height="56dp"
android:background="@drawable/list_item_selector_background" android:background="@drawable/list_item_selector_background"
android:paddingEnd="4dp"> android:paddingEnd="4dp">

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="screen_edge_margin">24dp</dimen>
</resources>

View file

@ -12,4 +12,6 @@
<dimen name="fab_list_padding">88dp</dimen> <dimen name="fab_list_padding">88dp</dimen>
<dimen name="action_toolbar_list_padding">72dp</dimen> <dimen name="action_toolbar_list_padding">72dp</dimen>
<dimen name="screen_edge_margin">16dp</dimen>
</resources> </resources>

View file

@ -177,17 +177,11 @@
<style name="Theme.Widget.CardView" parent="CardView"> <style name="Theme.Widget.CardView" parent="CardView">
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>
<item name="android:padding">@dimen/material_component_cards_top_and_bottom_padding</item> <item name="android:padding">16dp</item>
<item name="android:layout_marginTop">@dimen/material_component_cards_space_between_cards <item name="android:layout_marginTop">8dp</item>
</item> <item name="android:layout_marginBottom">8dp</item>
<item name="android:layout_marginBottom"> <item name="android:layout_marginStart">8dp</item>
@dimen/material_component_cards_space_between_cards <item name="android:layout_marginEnd">8dp</item>
</item>
<item name="android:layout_marginStart">
@dimen/material_component_cards_space_between_cards
</item>
<item name="android:layout_marginEnd">@dimen/material_component_cards_space_between_cards
</item>
<item name="cardBackgroundColor">?attr/colorSurface</item> <item name="cardBackgroundColor">?attr/colorSurface</item>
<item name="cardCornerRadius">@dimen/card_radius</item> <item name="cardCornerRadius">@dimen/card_radius</item>
<item name="cardElevation">2dp</item> <item name="cardElevation">2dp</item>