mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 19:27:25 +01:00
Fixed tracking cardview + readded AMOLED theme. (#798)
* Fixed cardview margin for sources * Added AMOLED again * changed padding to margin
This commit is contained in:
parent
55be9b9ca5
commit
062788f222
@ -50,8 +50,8 @@ class SettingsGeneralController : SettingsController() {
|
|||||||
intListPreference {
|
intListPreference {
|
||||||
key = Keys.theme
|
key = Keys.theme
|
||||||
titleRes = R.string.pref_theme
|
titleRes = R.string.pref_theme
|
||||||
entriesRes = arrayOf(R.string.light_theme, R.string.dark_theme)
|
entriesRes = arrayOf(R.string.light_theme, R.string.dark_theme, R.string.amoled_theme)
|
||||||
entryValues = arrayOf("1", "2")
|
entryValues = arrayOf("1", "2", "3")
|
||||||
defaultValue = "1"
|
defaultValue = "1"
|
||||||
summary = "%s"
|
summary = "%s"
|
||||||
|
|
||||||
|
@ -9,10 +9,8 @@
|
|||||||
android:id="@+id/recycler"
|
android:id="@+id/recycler"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
android:paddingTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:paddingStart="2dp"
|
|
||||||
android:paddingEnd="2dp"
|
|
||||||
tools:listitem="@layout/item_recently_read">
|
tools:listitem="@layout/item_recently_read">
|
||||||
|
|
||||||
</android.support.v7.widget.RecyclerView>
|
</android.support.v7.widget.RecyclerView>
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical" android:layout_width="match_parent"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<android.support.v4.widget.SwipeRefreshLayout
|
<android.support.v4.widget.SwipeRefreshLayout
|
||||||
@ -8,12 +10,15 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/track_recycler"
|
android:id="@+id/track_recycler"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"
|
||||||
|
tools:listitem="@layout/item_track"/>
|
||||||
|
|
||||||
</android.support.v4.widget.SwipeRefreshLayout>
|
</android.support.v4.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.v7.widget.CardView
|
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/cv_manga"
|
android:id="@+id/cv_manga"
|
||||||
style="@style/Theme.Widget.CardView"
|
style="@style/Theme.Widget.CardView.Item"
|
||||||
>
|
android:padding="0dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -27,7 +26,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="@dimen/card_margin">
|
android:padding="@dimen/material_component_cards_primary_title_top_padding">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/manga_title"
|
android:id="@+id/manga_title"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.v7.widget.CardView
|
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
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:id="@+id/track"
|
android:id="@+id/track"
|
||||||
style="@style/Theme.Widget.CardView">
|
style="@style/Theme.Widget.CardView.Item"
|
||||||
|
android:padding="0dp">
|
||||||
|
|
||||||
<android.support.constraint.ConstraintLayout
|
<android.support.constraint.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -14,10 +14,10 @@
|
|||||||
android:id="@+id/logo"
|
android:id="@+id/logo"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
tools:background="#2E51A2"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
tools:background="#2E51A2">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/track_logo"
|
android:id="@+id/track_logo"
|
||||||
@ -32,12 +32,12 @@
|
|||||||
android:id="@+id/title_container"
|
android:id="@+id/title_container"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
|
||||||
android:background="?attr/selectable_list_drawable"
|
android:background="?attr/selectable_list_drawable"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:padding="16dp"
|
||||||
app:layout_constraintLeft_toRightOf="@+id/logo"
|
app:layout_constraintLeft_toRightOf="@+id/logo"
|
||||||
app:layout_constraintRight_toRightOf="parent">
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/TextAppearance.Regular.Body1"
|
style="@style/TextAppearance.Regular.Body1"
|
||||||
@ -50,11 +50,11 @@
|
|||||||
style="@style/TextAppearance.Medium.Button"
|
style="@style/TextAppearance.Medium.Button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginLeft="4dp"
|
android:layout_marginLeft="4dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:ellipsize="middle"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:ellipsize="middle"
|
|
||||||
android:text="@string/action_edit" />
|
android:text="@string/action_edit" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -63,25 +63,25 @@
|
|||||||
android:id="@+id/divider1"
|
android:id="@+id/divider1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
android:background="?android:attr/divider"
|
android:background="?android:attr/divider"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/title_container"
|
|
||||||
app:layout_constraintLeft_toRightOf="@+id/logo"
|
app:layout_constraintLeft_toRightOf="@+id/logo"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
android:layout_marginStart="16dp"
|
app:layout_constraintTop_toBottomOf="@+id/title_container" />
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginRight="16dp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/status_container"
|
android:id="@+id/status_container"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
|
||||||
android:background="?attr/selectable_list_drawable"
|
android:background="?attr/selectable_list_drawable"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/divider1"
|
android:padding="16dp"
|
||||||
app:layout_constraintLeft_toRightOf="@+id/logo"
|
app:layout_constraintLeft_toRightOf="@+id/logo"
|
||||||
app:layout_constraintRight_toRightOf="parent">
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/divider1">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/TextAppearance.Regular.Body1"
|
style="@style/TextAppearance.Regular.Body1"
|
||||||
@ -94,8 +94,8 @@
|
|||||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginLeft="4dp"
|
android:layout_marginLeft="4dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
tools:text="Reading" />
|
tools:text="Reading" />
|
||||||
|
|
||||||
@ -105,25 +105,25 @@
|
|||||||
android:id="@+id/divider2"
|
android:id="@+id/divider2"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
android:background="?android:attr/divider"
|
android:background="?android:attr/divider"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/status_container"
|
|
||||||
app:layout_constraintLeft_toRightOf="@+id/logo"
|
app:layout_constraintLeft_toRightOf="@+id/logo"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
android:layout_marginStart="16dp"
|
app:layout_constraintTop_toBottomOf="@+id/status_container" />
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginRight="16dp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/chapters_container"
|
android:id="@+id/chapters_container"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
|
||||||
android:background="?attr/selectable_list_drawable"
|
android:background="?attr/selectable_list_drawable"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/divider2"
|
android:padding="16dp"
|
||||||
app:layout_constraintLeft_toRightOf="@+id/logo"
|
app:layout_constraintLeft_toRightOf="@+id/logo"
|
||||||
app:layout_constraintRight_toRightOf="parent">
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/divider2">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/TextAppearance.Regular.Body1"
|
style="@style/TextAppearance.Regular.Body1"
|
||||||
@ -136,8 +136,8 @@
|
|||||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginLeft="4dp"
|
android:layout_marginLeft="4dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
tools:text="12/24" />
|
tools:text="12/24" />
|
||||||
|
|
||||||
@ -147,25 +147,25 @@
|
|||||||
android:id="@+id/divider3"
|
android:id="@+id/divider3"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
android:background="?android:attr/divider"
|
android:background="?android:attr/divider"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/chapters_container"
|
|
||||||
app:layout_constraintLeft_toRightOf="@+id/logo"
|
app:layout_constraintLeft_toRightOf="@+id/logo"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
android:layout_marginStart="16dp"
|
app:layout_constraintTop_toBottomOf="@+id/chapters_container" />
|
||||||
android:layout_marginLeft="16dp"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginRight="16dp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/score_container"
|
android:id="@+id/score_container"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="16dp"
|
|
||||||
android:background="?attr/selectable_list_drawable"
|
android:background="?attr/selectable_list_drawable"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/divider3"
|
android:padding="16dp"
|
||||||
app:layout_constraintLeft_toRightOf="@+id/logo"
|
app:layout_constraintLeft_toRightOf="@+id/logo"
|
||||||
app:layout_constraintRight_toRightOf="parent">
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/divider3">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/TextAppearance.Regular.Body1"
|
style="@style/TextAppearance.Regular.Body1"
|
||||||
@ -178,8 +178,8 @@
|
|||||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginLeft="4dp"
|
android:layout_marginLeft="4dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
tools:text="10" />
|
tools:text="10" />
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<dimen name="margin_left">16dp</dimen>
|
<dimen name="margin_left">16dp</dimen>
|
||||||
<dimen name="margin_right">16dp</dimen>
|
<dimen name="margin_right">16dp</dimen>
|
||||||
<dimen name="fab_margin">16dp</dimen>
|
<dimen name="fab_margin">16dp</dimen>
|
||||||
<dimen name="card_margin">16dp</dimen>
|
<dimen name="space_between_cards">4dp</dimen>
|
||||||
<dimen name="fab_size">56dp</dimen>
|
<dimen name="fab_size">56dp</dimen>
|
||||||
|
|
||||||
<dimen name="dialog_content_padding">24dp</dimen>
|
<dimen name="dialog_content_padding">24dp</dimen>
|
||||||
|
@ -146,12 +146,18 @@
|
|||||||
<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:layout_marginTop">@dimen/material_component_cards_space_between_cards</item>
|
||||||
|
<item name="android:layout_marginBottom">@dimen/material_component_cards_space_between_cards</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/background_card</item>
|
<item name="cardBackgroundColor">?attr/background_card</item>
|
||||||
<item name="cardElevation">3dp</item>
|
<item name="cardElevation">2dp</item>
|
||||||
<item name="cardUseCompatPadding">true</item>
|
</style>
|
||||||
<item name="cardCornerRadius">2dp</item>
|
|
||||||
<item name="android:layout_marginLeft">2dp</item>
|
<style name="Theme.Widget.CardView.Item">
|
||||||
<item name="android:layout_marginRight">2dp</item>
|
<item name="android:layout_marginTop">@dimen/space_between_cards</item>
|
||||||
|
<item name="android:layout_marginBottom">@dimen/space_between_cards</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.Widget.GridView">
|
<style name="Theme.Widget.GridView">
|
||||||
|
Loading…
Reference in New Issue
Block a user