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.
val migrationItem = menu.findItem(R.id.action_migrate)
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 }
shareItem.isVisible = migrationItem.isVisible
if (count == 0) destroyActionModeIfNeeded()

View File

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

View File

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

View File

@ -38,7 +38,6 @@
android:layout_width="14dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:alpha="0.5"
android:contentDescription="@string/select_all"
android:src="@drawable/ic_expand_less_24dp"
android:tint="?android:textColorPrimary"
@ -99,7 +98,7 @@
android:clickable="true"
android:drawableEnd="@drawable/ic_sort_24dp"
android:drawablePadding="6dp"
android:drawableTint="@color/gray_button"
android:drawableTint="?android:textColorPrimary"
android:ellipsize="start"
android:focusable="true"
android:gravity="center|end"
@ -128,7 +127,7 @@
android:focusable="true"
android:padding="4dp"
android:src="@drawable/ic_refresh_24dp"
android:tint="@color/gray_button"
android:tint="?android:textColorPrimary"
android:tooltipText="@string/update"
app:layout_constraintBottom_toBottomOf="@id/category_title"
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>
<!-- Default screen margins, per the Android Design guidelines. -->
<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_margin">16dp</dimen>

View File

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