mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 05:25:08 +01:00
More attr cleanup
This commit is contained in:
parent
776e75cb6c
commit
2fa1c71fbd
@ -2,9 +2,7 @@ package eu.kanade.tachiyomi.ui.extension
|
||||
|
||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||
import eu.davidea.flexibleadapter.items.IFlexible
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.ui.extension.ExtensionAdapter.OnButtonClickListener
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
|
||||
/**
|
||||
* Adapter that holds the catalogue cards.
|
||||
@ -14,9 +12,6 @@ import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
class ExtensionAdapter(val listener: OnButtonClickListener) :
|
||||
FlexibleAdapter<IFlexible<*>>(null, listener, true) {
|
||||
|
||||
val cardBackground = (listener as ExtensionBottomSheet).context.getResourceColor(R.attr
|
||||
.background_card)
|
||||
|
||||
init {
|
||||
setDisplayHeadersAtStartUp(true)
|
||||
}
|
||||
|
@ -2,8 +2,6 @@ package eu.kanade.tachiyomi.ui.migration
|
||||
|
||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||
import eu.davidea.flexibleadapter.items.IFlexible
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
|
||||
/**
|
||||
* Adapter that holds the catalogue cards.
|
||||
@ -13,8 +11,6 @@ import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
class SourceAdapter(val controller: MigrationController) :
|
||||
FlexibleAdapter<IFlexible<*>>(null, controller, true) {
|
||||
|
||||
val cardBackground = controller.activity!!.getResourceColor(R.attr.background_card)
|
||||
|
||||
private var items: List<IFlexible<*>>? = null
|
||||
|
||||
init {
|
||||
|
@ -2,8 +2,6 @@ package eu.kanade.tachiyomi.ui.source
|
||||
|
||||
import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||
import eu.davidea.flexibleadapter.items.IFlexible
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
|
||||
/**
|
||||
* Adapter that holds the catalogue cards.
|
||||
@ -13,8 +11,6 @@ import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
class SourceAdapter(val controller: SourceController) :
|
||||
FlexibleAdapter<IFlexible<*>>(null, controller, true) {
|
||||
|
||||
val cardBackground = controller.activity!!.getResourceColor(R.attr.background_card)
|
||||
|
||||
init {
|
||||
setDisplayHeadersAtStartUp(true)
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
</item>
|
||||
|
||||
<item android:id="@android:id/mask">
|
||||
<color android:color="?attr/background_card" />
|
||||
<color android:color="?md_background_color" />
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:id="@+id/chapter_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?selectable_list_drawable"
|
||||
android:background="@drawable/list_item_selector"
|
||||
android:tooltipText="@string/sort_and_filter"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -55,7 +55,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:background="@drawable/list_item_selector"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
@ -9,7 +9,7 @@
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:background="?attr/selectable_list_drawable">
|
||||
android:background="@drawable/list_item_selector">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit_button"
|
||||
|
@ -346,7 +346,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:tooltipText="@string/sort_and_filter"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="?selectable_list_drawable"
|
||||
android:background="@drawable/list_item_selector"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/start_reading_button">
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/constraint_layout"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:background="@drawable/list_item_selector"
|
||||
android:minHeight="@dimen/material_component_lists_single_line_with_avatar_height">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
|
@ -10,7 +10,7 @@
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/material_component_lists_two_line_height"
|
||||
android:background="?attr/selectable_list_drawable">
|
||||
android:background="@drawable/list_item_selector">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit_button"
|
||||
|
@ -5,7 +5,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height"
|
||||
android:background="?attr/selectable_list_drawable">
|
||||
android:background="@drawable/list_item_selector">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit_button"
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:layout_height="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:background="@drawable/list_item_selector"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
android:id="@+id/front_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/material_component_lists_two_line_height"
|
||||
android:background="?attr/selectable_list_drawable">
|
||||
android:background="@drawable/list_item_selector">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/manga_cover"
|
||||
|
@ -33,7 +33,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:background="@drawable/list_item_selector"
|
||||
android:minHeight="@dimen/material_component_lists_single_line_with_avatar_height">
|
||||
|
||||
<FrameLayout
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/history_card"
|
||||
style="@style/Theme.Widget.CardView.Item"
|
||||
android:padding="0dp">
|
||||
|
||||
@ -70,4 +72,4 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/recent_item"
|
||||
android:background="?selectable_list_drawable"
|
||||
android:background="@drawable/list_item_selector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:background="@drawable/list_item_selector"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingEnd="4dp"
|
||||
|
@ -49,7 +49,7 @@
|
||||
android:id="@+id/card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/material_component_lists_two_line_height"
|
||||
android:background="?attr/selectable_list_drawable">
|
||||
android:background="@drawable/list_item_selector">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit_button"
|
||||
|
@ -11,7 +11,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/background_card">
|
||||
android:background="?md_background_color">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/logo_container"
|
||||
|
@ -43,7 +43,7 @@
|
||||
android:dividerHeight="10dp"
|
||||
android:footerDividersEnabled="true"
|
||||
android:headerDividersEnabled="true"
|
||||
android:listSelector="?attr/selectable_list_drawable"
|
||||
android:listSelector="@drawable/list_item_selector"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:scrollbars="none"
|
||||
|
@ -8,7 +8,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="216dp"
|
||||
android:background="?attr/selectable_list_drawable"
|
||||
android:background="@drawable/list_item_selector"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
|
@ -18,11 +18,6 @@
|
||||
<item name="android:colorBackground">@color/md_black_1000</item>
|
||||
<item name="android:statusBarColor">@color/blackStatus</item>
|
||||
|
||||
<!-- Custom Attributes-->
|
||||
<item name="selectable_list_drawable">@drawable/list_item_selector</item>
|
||||
<item name="background_card">@color/colorAmoledPrimary</item>
|
||||
|
||||
|
||||
<!-- Material Dialog colors -->
|
||||
<item name="md_color_title">@color/textColorPrimary</item>
|
||||
<item name="md_color_content">@color/textColorSecondary</item>
|
||||
|
@ -23,6 +23,4 @@
|
||||
<attr name="actionBarTintColor" format="color"/>
|
||||
<attr name="tabBarIconColor" format="reference|integer"/>
|
||||
<attr name="tabBarIconInactive" format="reference|integer"/>
|
||||
<attr name="selectable_list_drawable" format="reference|integer" />
|
||||
<attr name="background_card" format="reference|integer"/>
|
||||
</resources>
|
||||
|
@ -150,7 +150,7 @@
|
||||
</item>
|
||||
<item name="android:layout_marginEnd">@dimen/material_component_cards_space_between_cards
|
||||
</item>
|
||||
<item name="cardBackgroundColor">?attr/background_card</item>
|
||||
<item name="cardBackgroundColor">?md_background_color</item>
|
||||
<item name="cardElevation">2dp</item>
|
||||
</style>
|
||||
|
||||
@ -178,7 +178,7 @@
|
||||
|
||||
<style name="Theme.Widget.SpinnerItem" parent="Widget.AppCompat.DropDownItem.Spinner">
|
||||
<item name="android:textColor">?android:textColorPrimary</item>
|
||||
<item name="android:background">?attr/selectable_list_drawable</item>
|
||||
<item name="android:background">@drawable/list_item_selector</item>
|
||||
</style>
|
||||
|
||||
<!-- set the rounded drawable as background to your bottom sheet -->
|
||||
|
@ -26,9 +26,6 @@
|
||||
<item name="android:divider">@color/divider</item>
|
||||
<item name="android:listDivider">@drawable/line_divider</item>
|
||||
<item name="actionModeStyle">@style/CustomActionModeStyle</item>
|
||||
<item name="tabBarIconColor">?colorAccent</item>
|
||||
<item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
|
||||
|
||||
|
||||
<!-- Themes -->
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
@ -36,8 +33,9 @@
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
||||
|
||||
<!-- Custom Attributes-->
|
||||
<item name="selectable_list_drawable">@drawable/list_item_selector</item>
|
||||
<item name="actionBarTintColor">@color/textColorPrimary</item>
|
||||
<item name="tabBarIconColor">?colorAccent</item>
|
||||
<item name="tabBarIconInactive">@color/colorPrimaryInactive</item>
|
||||
|
||||
<item name="android:statusBarColor">@color/mainStatus</item>
|
||||
<item name="android:navigationBarColor">#B3000000</item>
|
||||
@ -50,6 +48,7 @@
|
||||
<item name="md_background_color">@color/dialog</item>
|
||||
<item name="md_button_casing">literal</item>
|
||||
<item name="md_corner_radius">16dp</item>
|
||||
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:windowLightNavigationBar" tools:targetApi="27">true</item>
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user