moved to ?attr

This commit is contained in:
LagradOst 2021-09-19 22:33:39 +02:00
parent 4ee7623fbe
commit bc1653e8c1
26 changed files with 81 additions and 100 deletions

View file

@ -196,7 +196,7 @@ class ResultFragment : Fragment() {
super.onResume()
activity?.let {
it.window?.navigationBarColor =
it.colorFromAttribute(R.attr.bitDarkerGrayBackground)
it.colorFromAttribute(R.attr.primaryBlackBackground)
}
}
@ -260,7 +260,7 @@ class ResultFragment : Fragment() {
hideKeyboard()
activity?.fixPaddingStatusbar(result_scroll)
activity?.fixPaddingStatusbar(result_barstatus)
//activity?.fixPaddingStatusbar(result_barstatus)
val backParameter = result_back.layoutParams as CoordinatorLayout.LayoutParams
backParameter.setMargins(
@ -317,10 +317,10 @@ class ResultFragment : Fragment() {
result_back.visibility = if (setAlpha > 0) VISIBLE else GONE
})
result_toolbar.setNavigationIcon(R.drawable.ic_baseline_arrow_back_24)
result_toolbar.setNavigationOnClickListener {
activity?.onBackPressed()
}
// result_toolbar.setNavigationIcon(R.drawable.ic_baseline_arrow_back_24)
// result_toolbar.setNavigationOnClickListener {
// activity?.onBackPressed()
// }
result_back.setOnClickListener {
activity?.popCurrentPage()
@ -1055,7 +1055,7 @@ class ResultFragment : Fragment() {
//val titleName = (if (preferEnglish) d.engName else d.japName) ?: d.name
val titleName = d.name
result_title.text = titleName
result_toolbar.title = titleName
//result_toolbar.title = titleName
}
else -> result_title.text = d.name
}

View file

@ -3,5 +3,5 @@
<gradient
android:angle="-90"
android:startColor="@color/transparent"
android:endColor="@color/bitDarkerGrayBackground"/>
android:endColor="?attr/primaryBlackBackground"/>
</shape>

View file

@ -2,6 +2,6 @@
<inset xmlns:android="http://schemas.android.com/apk/res/android">
<shape android:shape="rectangle">
<corners android:radius="10dp" />
<solid android:color="?attr/bitDarkerGrayBackground" />
<solid android:color="?attr/primaryBlackBackground" />
</shape>
</inset>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?attr/bitDarkerGrayBackground"/>
<solid android:color="?attr/primaryBlackBackground"/>
<stroke android:width="@dimen/mtrl_btn_stroke_size" android:color="@color/mtrl_btn_stroke_color_selector"/>
</shape>

View file

@ -14,7 +14,7 @@
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<corners android:radius="2dp" />
<solid android:color="@color/grayBackground" />
<solid android:color="@color/iconGrayBackground" />
</shape>
</item>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/grayBackground"/>
<solid android:color="?attr/iconGrayBackground"/>
<corners android:topLeftRadius="16dp"
android:topRightRadius="16dp"/>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="?attr/bitDarkerGrayBackground"/>
<color android:color="?attr/primaryBlackBackground"/>
</item>
<item android:width="150dp" android:height="150dp" android:gravity="center" android:drawable="@drawable/ic_launcher_foreground">
</item>

View file

@ -16,7 +16,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?attr/darkBackground"
app:itemRippleColor="@color/colorRipple"
app:labelVisibilityMode="labeled"
app:layout_constraintLeft_toLeftOf="parent"

View file

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:background="?attr/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
android:layout_height="match_parent">
<TextView

View file

@ -15,8 +15,8 @@
<androidx.core.widget.ContentLoadingProgressBar
android:layout_marginBottom="-1.5dp"
android:id="@+id/download_child_episode_progress"
android:progressTint="@color/colorPrimary"
android:progressBackgroundTint="@color/colorPrimary"
android:progressTint="?attr/colorPrimary"
android:progressBackgroundTint="?attr/colorPrimary"
style="@android:style/Widget.Material.ProgressBar.Horizontal"
android:layout_width="match_parent"
tools:progress="50"

View file

@ -26,7 +26,7 @@
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:background="?attr/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:padding="10dp"
tools:listitem="@layout/download_child_episode"

View file

@ -108,7 +108,7 @@
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:background="?attr/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:padding="10dp"
android:id="@+id/download_list"

View file

@ -5,7 +5,7 @@
android:id="@+id/result_root"
android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
android:clickable="true"
android:focusable="true"
>
@ -32,12 +32,12 @@
android:visibility="visible"
android:textStyle="bold"
app:rippleColor="?attr/grayBackground"
android:textColor="?attr/grayBackground"
app:iconTint="?attr/grayBackground"
app:rippleColor="?attr/iconGrayBackground"
android:textColor="?attr/iconGrayBackground"
app:iconTint="?attr/iconGrayBackground"
android:textAllCaps="false"
app:iconGravity="textStart"
app:strokeColor="?attr/grayBackground"
app:strokeColor="?attr/iconGrayBackground"
app:backgroundTint="?attr/textColor"
app:icon="@drawable/ic_baseline_autorenew_24"
@ -57,7 +57,7 @@
app:iconGravity="textStart"
app:strokeColor="?attr/textColor"
android:backgroundTint="?attr/grayBackground"
android:backgroundTint="?attr/iconGrayBackground"
app:rippleColor="?attr/textColor"
android:textColor="?attr/textColor"
app:iconTint="?attr/textColor"
@ -91,22 +91,6 @@
android:id="@+id/result_finish_loading"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:visibility="gone"
android:id="@+id/result_barstatus"
android:background="@color/grayBackground"
android:layout_width="match_parent"
android:alpha="0"
tools:alpha="1"
android:layout_height="wrap_content">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/result_toolbar"
android:paddingTop="@dimen/navbarHeight"
app:title="Perfect Run"
app:layout_scrollFlags="scroll|enterAlways"
android:layout_width="match_parent" android:layout_height="wrap_content">
</com.google.android.material.appbar.MaterialToolbar>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
android:visibility="gone"
@ -120,7 +104,7 @@
android:scaleType="centerCrop"
android:alpha="0.7"
tools:src="@drawable/example_poster"
android:background="@color/darkBackground"
android:background="@color/primaryGrayBackground"
android:id="@+id/result_poster_blur"
tools:ignore="ContentDescription"/>
<ImageView
@ -210,12 +194,12 @@
android:id="@+id/result_bookmark_button"
tools:text="Bookmark"
app:rippleColor="?attr/bitDarkerGrayBackground"
app:rippleColor="?attr/primaryBlackBackground"
android:textColor="?attr/textColor"
app:iconTint="?attr/textColor"
android:textAllCaps="false"
app:icon="@drawable/ic_outline_remove_red_eye_24"
android:backgroundTint="?attr/grayBackground"
android:backgroundTint="?attr/iconGrayBackground"
style="@style/Widget.MaterialComponents.Button"
android:layout_width="wrap_content"
android:layout_height="50dp">
@ -410,7 +394,7 @@
android:id="@+id/result_season_button"
tools:text="Season 1"
app:rippleColor="?attr/grayBackground"
app:rippleColor="?attr/iconGrayBackground"
android:textColor="?attr/textColor"
app:iconTint="?attr/textColor"
android:textAllCaps="false"
@ -427,7 +411,7 @@
android:id="@+id/result_episode_select"
tools:text="50-100"
app:rippleColor="?attr/grayBackground"
app:rippleColor="?attr/iconGrayBackground"
android:textColor="?attr/textColor"
app:iconTint="?attr/textColor"
android:textAllCaps="false"
@ -466,7 +450,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<fragment
app:customCastBackgroundColor="?attr/bitDarkerGrayBackground"
app:customCastBackgroundColor="?attr/primaryBlackBackground"
app:castControlButtons="@array/cast_mini_controller_control_buttons"
android:id="@+id/cast_mini_controller"
android:layout_width="match_parent"

View file

@ -11,7 +11,7 @@
android:elevation="10dp"
app:cardCornerRadius="@dimen/roundedImageRadius"
android:id="@+id/backgroundCard"
app:cardBackgroundColor="@color/darkBackground"
app:cardBackgroundColor="@color/primaryGrayBackground"
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">
<ImageView
@ -57,8 +57,8 @@
<androidx.core.widget.ContentLoadingProgressBar
android:layout_marginBottom="-1.5dp"
android:id="@+id/watchProgress"
android:progressTint="@color/colorPrimary"
android:progressBackgroundTint="@color/colorPrimary"
android:progressTint="?attr/colorPrimary"
android:progressBackgroundTint="?attr/colorPrimary"
style="@android:style/Widget.Material.ProgressBar.Horizontal"
android:layout_width="match_parent"
tools:progress="50"
@ -90,7 +90,7 @@
android:layout_height="match_parent">
<!--
<ImageView android:id="@+id/text_is_dub" android:tint="@color/colorPrimary"
<ImageView android:id="@+id/text_is_dub" android:tint="?attr/colorPrimary"
android:src="@drawable/ic_baseline_subtitles_24" android:layout_width="wrap_content"
android:layout_height="20dp">

View file

@ -35,7 +35,7 @@
</TextView>
<ListView
android:id="@+id/sort_providers"
android:background="?attr/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
tools:listitem="@layout/sort_bottom_single_choice"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -85,7 +85,7 @@
<ListView
android:id="@+id/sort_subtitles"
android:background="?attr/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
tools:listitem="@layout/sort_bottom_single_choice"
android:layout_width="match_parent"
android:layout_rowWeight="1"

View file

@ -24,7 +24,7 @@
android:layout_marginTop="-10dp"
android:paddingTop="10dp"
android:id="@+id/sort_speed"
android:background="?attr/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
tools:listitem="@layout/sort_bottom_single_choice"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:background="?attr/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
android:layout_height="match_parent">
<com.google.android.material.switchmaterial.SwitchMaterial

View file

@ -21,7 +21,7 @@
android:layout_weight="0.5"
android:id="@+id/episode_view_procentage"
android:alpha="0.2"
android:background="@color/colorPrimary"
android:background="?attr/colorPrimary"
android:layout_width="0dp"
android:layout_height="match_parent">
</View>
@ -37,8 +37,8 @@
<androidx.core.widget.ContentLoadingProgressBar
android:layout_marginBottom="-1.5dp"
android:id="@+id/episode_progress"
android:progressTint="@color/colorPrimary"
android:progressBackgroundTint="@color/colorPrimary"
android:progressTint="?attr/colorPrimary"
android:progressBackgroundTint="?attr/colorPrimary"
style="@android:style/Widget.Material.ProgressBar.Horizontal"
android:layout_width="match_parent"
tools:progress="50"

View file

@ -44,8 +44,8 @@
<androidx.core.widget.ContentLoadingProgressBar
android:layout_marginBottom="-1.5dp"
android:id="@+id/episode_progress"
android:progressTint="@color/colorPrimary"
android:progressBackgroundTint="@color/colorPrimary"
android:progressTint="?attr/colorPrimary"
android:progressBackgroundTint="?attr/colorPrimary"
style="@android:style/Widget.Material.ProgressBar.Horizontal"
android:layout_width="match_parent"
tools:progress="50"

View file

@ -19,7 +19,7 @@
android:elevation="10dp"
app:cardCornerRadius="@dimen/roundedImageRadius"
android:id="@+id/backgroundCard"
app:cardBackgroundColor="@color/darkBackground"
app:cardBackgroundColor="@color/primaryGrayBackground"
>
<ImageView
@ -93,7 +93,7 @@
android:layout_height="match_parent">
<!--
<ImageView android:id="@+id/text_is_dub" android:tint="@color/colorPrimary"
<ImageView android:id="@+id/text_is_dub" android:tint="?attr/colorPrimary"
android:src="@drawable/ic_baseline_subtitles_24" android:layout_width="wrap_content"
android:layout_height="20dp">

View file

@ -29,7 +29,7 @@
android:layout_marginTop="-10dp"
android:paddingTop="10dp"
android:id="@+id/sort_providers"
android:background="?attr/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
tools:listitem="@layout/sort_bottom_single_choice"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -59,7 +59,7 @@
android:layout_marginTop="-10dp"
android:paddingTop="10dp"
android:id="@+id/sort_subtitles"
android:background="?attr/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
tools:listitem="@layout/sort_bottom_single_choice"
android:layout_width="match_parent"
android:layout_rowWeight="1"

View file

@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/subs_root"
android:background="?attr/bitDarkerGrayBackground"
android:background="?attr/primaryBlackBackground"
>
<LinearLayout
android:orientation="vertical"

View file

@ -7,7 +7,7 @@
android:layout_height="match_parent"
android:padding="5dp"
app:cardCornerRadius="10dp"
android:background="?attr/bitDarkerGrayBackground">
android:background="?attr/primaryBlackBackground">
<TextView
android:padding="20dp"

View file

@ -19,8 +19,8 @@
<attr name="colorItemSeen" format="color"/>
<attr name="darkBackground" format="color"/>
<attr name="bitDarkerGrayBackground" format="color"/>
<attr name="grayBackground" format="color"/>
<attr name="primaryBlackBackground" format="color"/>
<attr name="iconGrayBackground" format="color"/>
<attr name="boxItemBackground" format="color"/>
<attr name="textColor" format="color"/>

View file

@ -2,16 +2,15 @@
<resources>
<color name="colorPrimary">#3d50fa</color>
<color name="colorPrimarySecond">@color/colorPrimary</color>
<color name="colorRipple">#1A3D50FA</color>
<color name="colorSearch">#303135</color> <!--#3444D1 @color/itemBackground-->
<color name="colorItemSeen">#1E1E32</color>
<color name="colorOngoing">#F53B66</color> <!--FF8181-->
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorAccent">#3b65f5</color> <!-- 818fff-->
<color name="darkBackground">#2B2C30</color> <!--0f0f10 0E0E10 303135 2B2C30-->
<color name="bitDarkerGrayBackground">#111111</color> <!--1C1C20 191a1f 19181E 202125 1C1C20-->
<color name="grayBackground">#1C1C20</color> <!--141419 202125-->
<color name="primaryGrayBackground">#2B2C30</color> <!--0f0f10 0E0E10 303135 2B2C30-->
<color name="primaryBlackBackground">#111111</color> <!--1C1C20 191a1f 19181E 202125 1C1C20-->
<color name="iconGrayBackground">#1C1C20</color> <!--141419 202125-->
<color name="itemBackground">#161616</color> <!-- 17171B 1B1B20-->
<color name="textColor">#e9eaee</color> <!--FFF-->

View file

@ -1,16 +1,12 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground">@drawable/splash_background</item>
<item name="android:navigationBarColor">?attr/bitDarkerGrayBackground</item>
<item name="android:navigationBarColor">?attr/primaryBlackBackground</item>
<item name="android:colorEdgeEffect">?attr/textColor</item>
<!--<item name="android:navigationBarColor">@color/darkBackground</item>-->
<item name="android:statusBarColor">@color/grayBackground</item>
<item name="android:statusBarColor">?attr/iconGrayBackground</item>
<item name="android:textColorHint">@color/searchColor</item>
<item name="android:editTextColor">@color/textColor</item>
@ -37,19 +33,22 @@
<!--<item name="mediaRouteButtonTint">?attr/colorPrimary</item>-->
<!-- DEF STYLE -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="textColor">@color/textColor</item>
<item name="colorItemSeen">@color/colorItemSeen</item>
<item name="grayTextColor">@color/grayTextColor</item>
<item name="darkBackground">@color/darkBackground</item>
<item name="bitDarkerGrayBackground">@color/bitDarkerGrayBackground</item>
<item name="grayBackground">@color/grayBackground</item>
<item name="darkBackground">@color/primaryGrayBackground</item>
<item name="primaryBlackBackground">@color/primaryBlackBackground</item>
<item name="iconGrayBackground">@color/iconGrayBackground</item>
<item name="boxItemBackground">@color/itemBackground</item>
<item name="iconColor">@color/iconColor</item>
<item name="white">#FFF</item>
</style>
<style name="LoadedStyle">
<item name="android:navigationBarColor">?attr/darkBackground</item>
<item name="android:windowBackground">?attr/bitDarkerGrayBackground</item>
<item name="android:windowBackground">?attr/primaryBlackBackground</item>
</style>
<style name="AppSearchViewStyle"
parent="Theme.MaterialComponents.NoActionBar">
@ -72,7 +71,6 @@
<style name="PreferenceTheme" parent="@style/AppTheme">
</style>
<style name="Theme.AlertDialog" parent="ThemeOverlay.MaterialComponents.Dialog.Alert">
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
@ -96,8 +94,8 @@
<item name="tabGravity">center</item>
<item name="backgroundTint">@color/transparent</item>
<item name="tabIndicator">@drawable/tab_selector</item>
<item name="tabIndicatorColor">@color/colorPrimary</item>
<item name="tabTextColor">@color/colorPrimary</item>
<item name="tabIndicatorColor">?attr/colorPrimary</item>
<item name="tabTextColor">?attr/colorPrimary</item>
<item name="tabIndicatorFullWidth">false</item>
<item name="tabIndicatorHeight">3dp</item>
<item name="tabInlineLabel">true</item>
@ -106,15 +104,15 @@
</style>
<style name="AlertDialogCustom" parent="Theme.AppCompat.Dialog.Alert">
<item name="android:windowFullscreen">true</item>
<item name="android:textColor">@color/textColor</item>
<item name="android:textColorPrimary">@color/textColor</item>
<item name="android:textColor">?attr/textColor</item>
<item name="android:textColorPrimary">?attr/textColor</item>
<!--<item name="android:background">@color/darkBackground</item>-->
<item name="android:textAllCaps">false</item>
<!--<item name="android:colorBackground">@color/darkBackground</item>-->
<item name="textColorAlertDialogListItem">@color/textColor</item>
<item name="colorControlNormal">@color/textColor</item>
<item name="textColorAlertDialogListItem">?attr/textColor</item>
<item name="colorControlNormal">?attr/textColor</item>
<!-- colorPrimarySecond used because colorPrimary fails for no reason -->
<item name="colorControlActivated">@color/colorPrimarySecond</item>
<item name="colorControlActivated">?attr/colorPrimary</item>
<item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
<item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
@ -124,17 +122,17 @@
<item name="android:windowBackground">@color/transparent</item>
</style>
<style name="AlertDialogCustomBlack" parent="Theme.AppCompat.Dialog.Alert">
<item name="android:windowBackground">@color/bitDarkerGrayBackground</item>
<item name="android:windowBackground">?attr/primaryBlackBackground</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">fill_parent</item>
<!-- No backgrounds, titles or window float -->
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">false</item>
<item name="android:navigationBarColor">@color/bitDarkerGrayBackground</item>
<item name="android:navigationBarColor">?attr/primaryBlackBackground</item>
</style>
<style name="PopupMenu" parent="@android:style/Widget.PopupMenu">
<item name="android:backgroundTint">?attr/bitDarkerGrayBackground</item>
<item name="android:backgroundTint">?attr/primaryBlackBackground</item>
</style>
<style name="SettingsItem">
@ -165,16 +163,16 @@
</style>
<style name="WhiteButton" parent="NiceButton">
<item name="strokeColor">?attr/grayBackground</item>
<item name="strokeColor">?attr/iconGrayBackground</item>
<item name="backgroundTint">?attr/textColor</item>
<item name="iconTint">?attr/grayBackground</item>
<item name="android:textColor">?attr/grayBackground</item>
<item name="rippleColor">?attr/grayBackground</item>
<item name="iconTint">?attr/iconGrayBackground</item>
<item name="android:textColor">?attr/iconGrayBackground</item>
<item name="rippleColor">?attr/iconGrayBackground</item>
</style>
<style name="BlackButton" parent="NiceButton">
<item name="strokeColor">?attr/textColor</item>
<item name="backgroundTint">?attr/grayBackground</item>
<item name="backgroundTint">?attr/iconGrayBackground</item>
<item name="iconTint">?attr/textColor</item>
<item name="android:textColor">?attr/textColor</item>
<item name="rippleColor">?attr/textColor</item>
@ -186,7 +184,7 @@
@array/cast_expanded_controller_control_buttons
</item>
<item name="castButtonColor">@null</item>
<item name="castSeekBarProgressAndThumbColor">@color/white</item> <!--@color/white ?attr/colorPrimary-->
<item name="castSeekBarProgressAndThumbColor">?attr/white</item> <!--@color/white ?attr/colorPrimary-->
<item name="castSeekBarSecondaryProgressColor">?attr/darkBackground
</item> <!--CHECK ?attr/darkBackground ?attr/colorPrimary-->
<item name="castBackground">?attr/colorPrimary</item>