Make cards and bottom sheet multiple of 4 for standards (#539)

* use dimens for corners on sheets
removed unused dimens
use same dimens on cards (can be reverted)
up card elevation slightly

* hide change categories when no categories exist
This commit is contained in:
Carlos 2020-08-09 14:59:15 -04:00 committed by GitHub
parent 7372109520
commit 90ca4ecf53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 13 deletions

View File

@ -1305,6 +1305,8 @@ class LibraryController(
// Destroy action mode if there are no items selected. // Destroy action mode if there are no items selected.
val migrationItem = menu.findItem(R.id.action_migrate) val migrationItem = menu.findItem(R.id.action_migrate)
val shareItem = menu.findItem(R.id.action_share) val shareItem = menu.findItem(R.id.action_share)
val categoryItem = menu.findItem(R.id.action_move_to_category)
categoryItem.isVisible = presenter.categories.size > 1
migrationItem.isVisible = selectedMangas.any { it.source != LocalSource.ID } migrationItem.isVisible = selectedMangas.any { it.source != LocalSource.ID }
shareItem.isVisible = migrationItem.isVisible shareItem.isVisible = migrationItem.isVisible
if (count == 0) destroyActionModeIfNeeded() if (count == 0) destroyActionModeIfNeeded()

View File

@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<corners <corners
android:topLeftRadius="14dp" android:topLeftRadius="@dimen/rounded_radius"
android:topRightRadius="14dp" /> android:topRightRadius="@dimen/rounded_radius" />
<solid android:color="?android:attr/colorBackground" /> <solid android:color="?android:attr/colorBackground" />
</shape> </shape>

View File

@ -5,8 +5,8 @@
<shape> <shape>
<solid android:color="@color/fullRippleColor" /> <solid android:color="@color/fullRippleColor" />
<corners <corners
android:topLeftRadius="14dp" android:topLeftRadius="@dimen/rounded_radius"
android:topRightRadius="14dp" /> android:topRightRadius="@dimen/rounded_radius" />
</shape> </shape>
</item> </item>
</ripple> </ripple>

View File

@ -38,7 +38,6 @@
android:layout_width="14dp" android:layout_width="14dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:alpha="0.5"
android:contentDescription="@string/select_all" android:contentDescription="@string/select_all"
android:src="@drawable/ic_expand_less_24dp" android:src="@drawable/ic_expand_less_24dp"
android:tint="?android:textColorPrimary" android:tint="?android:textColorPrimary"
@ -99,7 +98,7 @@
android:clickable="true" android:clickable="true"
android:drawableEnd="@drawable/ic_sort_24dp" android:drawableEnd="@drawable/ic_sort_24dp"
android:drawablePadding="6dp" android:drawablePadding="6dp"
android:drawableTint="@color/gray_button" android:drawableTint="?android:textColorPrimary"
android:ellipsize="start" android:ellipsize="start"
android:focusable="true" android:focusable="true"
android:gravity="center|end" android:gravity="center|end"
@ -128,7 +127,7 @@
android:focusable="true" android:focusable="true"
android:padding="4dp" android:padding="4dp"
android:src="@drawable/ic_refresh_24dp" android:src="@drawable/ic_refresh_24dp"
android:tint="@color/gray_button" android:tint="?android:textColorPrimary"
android:tooltipText="@string/update" android:tooltipText="@string/update"
app:layout_constraintBottom_toBottomOf="@id/category_title" app:layout_constraintBottom_toBottomOf="@id/category_title"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

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

View File

@ -1,7 +1,7 @@
<resources> <resources>
<!-- Default screen margins, per the Android Design guidelines. --> <!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="space_between_cards">4dp</dimen> <dimen name="space_between_cards">4dp</dimen>
<dimen name="rounder_radius">14dp</dimen> <dimen name="rounded_radius">12dp</dimen>
<dimen name="fab_size">56dp</dimen> <dimen name="fab_size">56dp</dimen>
<dimen name="fab_margin">16dp</dimen> <dimen name="fab_margin">16dp</dimen>

View File

@ -140,8 +140,9 @@
</item> </item>
<item name="android:layout_marginEnd">@dimen/material_component_cards_space_between_cards <item name="android:layout_marginEnd">@dimen/material_component_cards_space_between_cards
</item> </item>
<item name="cardCornerRadius">@dimen/rounded_radius</item>
<item name="cardBackgroundColor">?md_background_color</item> <item name="cardBackgroundColor">?md_background_color</item>
<item name="cardElevation">2dp</item> <item name="cardElevation">4dp</item>
</style> </style>
<style name="Theme.Widget.CardView.Item"> <style name="Theme.Widget.CardView.Item">