Various fixes

This commit is contained in:
Koitharu
2020-02-23 20:48:51 +02:00
parent dce877a139
commit 0e746091b8
30 changed files with 214 additions and 53 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/ic_placeholder_raw"
android:top="20dp"
android:bottom="20dp"
android:left="20dp"
android:right="20dp"
android:gravity="center" />
</layer-list>

View File

@@ -0,0 +1,14 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:tint="?android:textColorTertiary"
android:viewportWidth="489.4"
android:viewportHeight="489.4">
<path
android:fillColor="#FF000000"
android:pathData="M0,437.8c0,28.5 23.2,51.6 51.6,51.6h386.2c28.5,0 51.6,-23.2 51.6,-51.6V51.6c0,-28.5 -23.2,-51.6 -51.6,-51.6H51.6C23.1,0 0,23.2 0,51.6C0,51.6 0,437.8 0,437.8zM437.8,464.9H51.6c-14.9,0 -27.1,-12.2 -27.1,-27.1v-64.5l92.8,-92.8l79.3,79.3c4.8,4.8 12.5,4.8 17.3,0l143.2,-143.2l107.8,107.8v113.4C464.9,452.7 452.7,464.9 437.8,464.9zM51.6,24.5h386.2c14.9,0 27.1,12.2 27.1,27.1v238.1l-99.2,-99.1c-4.8,-4.8 -12.5,-4.8 -17.3,0L205.2,333.8l-79.3,-79.3c-4.8,-4.8 -12.5,-4.8 -17.3,0l-84.1,84.1v-287C24.5,36.7 36.7,24.5 51.6,24.5z" />
<path
android:fillColor="#FF000000"
android:pathData="M151.7,196.1c34.4,0 62.3,-28 62.3,-62.3s-28,-62.3 -62.3,-62.3s-62.3,28 -62.3,62.3S117.3,196.1 151.7,196.1zM151.7,96c20.9,0 37.8,17 37.8,37.8s-17,37.8 -37.8,37.8s-37.8,-17 -37.8,-37.8S130.8,96 151.7,96z" />
</vector>

View File

@@ -1,4 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
@@ -6,5 +7,5 @@
android:viewportHeight="24">
<path
android:fillColor="#000"
android:pathData="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z" />
android:pathData="M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z" />
</vector>

View File

@@ -9,6 +9,7 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorPrimary"
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<androidx.appcompat.widget.Toolbar
@@ -16,7 +17,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.MaterialComponents.Light" />
app:popupTheme="@style/AppPopupTheme" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"

View File

@@ -17,6 +17,7 @@
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorPrimary"
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<androidx.appcompat.widget.Toolbar
@@ -24,7 +25,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.MaterialComponents.Light" />
app:popupTheme="@style/AppPopupTheme" />
</com.google.android.material.appbar.AppBarLayout>

View File

@@ -26,7 +26,7 @@
android:id="@id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/ThemeOverlay.MaterialComponents.Light" />
app:popupTheme="@style/AppPopupTheme" />
</com.google.android.material.appbar.AppBarLayout>
@@ -46,7 +46,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
app:popupTheme="@style/ThemeOverlay.MaterialComponents.Light" />
app:popupTheme="@style/AppPopupTheme" />
</com.google.android.material.appbar.AppBarLayout>

View File

@@ -10,6 +10,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:background="?colorPrimary"
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<androidx.appcompat.widget.Toolbar
@@ -17,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="?android:actionBarSize"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.MaterialComponents.Light" />
app:popupTheme="@style/AppPopupTheme" />
</com.google.android.material.appbar.AppBarLayout>

View File

@@ -9,6 +9,7 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorPrimary"
android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<com.google.android.material.appbar.MaterialToolbar
@@ -16,7 +17,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.MaterialComponents.Light" />
app:popupTheme="@style/AppPopupTheme" />
</com.google.android.material.appbar.AppBarLayout>

View File

@@ -85,11 +85,11 @@
android:contentDescription="@string/add_to_favourites"
android:scaleType="center"
android:src="@drawable/ic_tag_heart_outline"
app:tint="?colorAccent"
app:layout_constraintBottom_toBottomOf="@id/button_read"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toStartOf="@id/button_read"
app:layout_constraintTop_toTopOf="@id/button_read" />
app:layout_constraintTop_toTopOf="@id/button_read"
app:tint="?colorAccent" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/barrier_title"
@@ -98,6 +98,16 @@
app:barrierDirection="bottom"
app:constraint_referenced_ids="imageView_cover, button_read" />
<View
android:id="@+id/divider_top"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="?android:listDivider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/barrier_title" />
<com.google.android.material.chip.ChipGroup
android:id="@+id/chips_tags"
android:layout_width="0dp"
@@ -106,7 +116,7 @@
android:padding="6dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/barrier_title" />
app:layout_constraintTop_toBottomOf="@id/divider_top" />
<TextView
android:id="@+id/textView_description"
@@ -127,10 +137,10 @@
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/chips_tags"
app:layout_constraintBottom_toBottomOf="@id/divider_top"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/chips_tags"
app:layout_constraintTop_toBottomOf="@id/divider_top"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -9,6 +9,7 @@
<org.koitharu.kotatsu.ui.common.widgets.CoverImageView
android:id="@+id/imageView_thumb"
android:scaleType="centerCrop"
tools:src="@drawable/ic_placeholder"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

View File

@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
@@ -44,8 +45,7 @@
android:layout_height="wrap_content"
android:scrollbars="vertical"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
app:spanCount="3"
tools:listitem="@layout/item_page_thumb" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="blue_primary">#1565C0</color>
<color name="blue_primary_dark">#283593</color>
<color name="red_accent">#FF8A65</color>
<color name="dim">#99000000</color>
<color name="error">#E57373</color>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppPopupTheme" parent="ThemeOverlay.MaterialComponents.Dark" />
</resources>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#0288D1</color>
<color name="primary_dark">#0D47A1</color>
<color name="accent">#F4511E</color>
<color name="blue_primary">#0288D1</color>
<color name="blue_primary_dark">#0D47A1</color>
<color name="red_accent">#F4511E</color>
<color name="dim">#99000000</color>
<color name="error">#D32F2F</color>
</resources>

View File

@@ -74,4 +74,5 @@
<string name="delete">Delete</string>
<string name="operation_not_supported">This operation is not supported</string>
<string name="text_file_not_supported">Invalid file. Only ZIP and CBZ are supported.</string>
<string name="no_description">No description</string>
</resources>

View File

@@ -8,4 +8,6 @@
<item name="android:paddingBottom">10dp</item>
</style>
<style name="AppPopupTheme" parent="ThemeOverlay.MaterialComponents.Light" />
</resources>

View File

@@ -3,9 +3,9 @@
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
<item name="colorPrimary">@color/blue_primary</item>
<item name="colorPrimaryDark">@color/blue_primary_dark</item>
<item name="colorAccent">@color/red_accent</item>
<item name="windowActionModeOverlay">true</item>
</style>