mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Address some Android lint warnings
This commit is contained in:
parent
e985ffc690
commit
ad49a02879
18 changed files with 28 additions and 93 deletions
|
@ -4,6 +4,7 @@ import android.content.Context
|
|||
import android.content.res.ColorStateList
|
||||
import android.util.AttributeSet
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
import androidx.core.widget.TextViewCompat
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.system.getThemeColor
|
||||
|
||||
|
@ -31,7 +32,7 @@ class QuadStateTextView @JvmOverloads constructor(context: Context, attrs: Attri
|
|||
context.getThemeColor(R.attr.colorAccent)
|
||||
}
|
||||
if (tint != 0) {
|
||||
compoundDrawableTintList = ColorStateList.valueOf(tint)
|
||||
TextViewCompat.setCompoundDrawableTintList(this, ColorStateList.valueOf(tint))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<alpha
|
||||
android:duration="2000"
|
||||
android:fillAfter="true"
|
||||
android:fromAlpha="0.0"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
android:toAlpha="1.0" />
|
||||
</set>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Based on mtrl_bottom_nav_colored_item_tint
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="1.0" android:color="?attr/colorPrimary" android:state_checked="true" />
|
||||
<item android:alpha="0.6" android:color="?attr/colorOnSurface" />
|
||||
</selector>
|
|
@ -1,10 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:alpha=".38"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M21,5v6.59l-3,-3.01 -4,4.01 -4,-4 -4,4 -3,-3.01L3,5c0,-1.1 0.9,-2 2,-2h14c1.1,0 2,0.9 2,2zM18,11.42l3,3.01L21,19c0,1.1 -0.9,2 -2,2L5,21c-1.1,0 -2,-0.9 -2,-2v-6.58l3,2.99 4,-4 4,4 4,-3.99z" />
|
||||
</vector>
|
|
@ -1,9 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M23.25,12.77l-2.57,-2.57 -1.41,1.41 2.22,2.22 -5.66,5.66L4.51,8.17l5.66,-5.66 2.1,2.1 1.41,-1.41L11.23,0.75c-0.59,-0.59 -1.54,-0.59 -2.12,0L2.75,7.11c-0.59,0.59 -0.59,1.54 0,2.12l12.02,12.02c0.59,0.59 1.54,0.59 2.12,0l6.36,-6.36c0.59,-0.59 0.59,-1.54 0,-2.12zM8.47,20.48C5.2,18.94 2.86,15.76 2.5,12L1,12c0.51,6.16 5.66,11 11.95,11l0.66,-0.03 -3.81,-3.82 -1.33,1.33zM16,9h5c0.55,0 1,-0.45 1,-1L22,4c0,-0.55 -0.45,-1 -1,-1v-0.5C21,1.12 19.88,0 18.5,0S16,1.12 16,2.5L16,3c-0.55,0 -1,0.45 -1,1v4c0,0.55 0.45,1 1,1zM16.8,2.5c0,-0.94 0.76,-1.7 1.7,-1.7s1.7,0.76 1.7,1.7L20.2,3h-3.4v-0.5z" />
|
||||
</vector>
|
|
@ -24,6 +24,7 @@
|
|||
android:id="@+id/expand_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:tint="?attr/colorOnBackground" />
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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:background="?attr/colorToolbar"
|
||||
|
@ -12,6 +13,7 @@
|
|||
android:layout_height="56dp"
|
||||
android:layout_gravity="center"
|
||||
app:srcCompat="@drawable/ic_tachi"
|
||||
app:tint="?attr/colorOnToolbar" />
|
||||
app:tint="?attr/colorOnToolbar"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</FrameLayout>
|
||||
|
|
|
@ -49,8 +49,7 @@
|
|||
app:layout_constraintEnd_toStartOf="@id/chapter_title"
|
||||
app:srcCompat="@drawable/ic_bookmark_24dp"
|
||||
app:tint="?attr/colorAccent"
|
||||
tools:visibility="visible"
|
||||
/>
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chapter_title"
|
||||
|
|
|
@ -7,48 +7,48 @@
|
|||
android:icon="@drawable/ic_get_app_24dp"
|
||||
android:title="@string/action_download"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_delete"
|
||||
android:icon="@drawable/ic_delete_24dp"
|
||||
android:title="@string/action_delete"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_bookmark"
|
||||
android:icon="@drawable/ic_bookmark_border_24dp"
|
||||
android:title="@string/action_bookmark"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_remove_bookmark"
|
||||
android:icon="@drawable/ic_bookmark_24dp"
|
||||
android:title="@string/action_remove_bookmark"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_mark_as_read"
|
||||
android:icon="@drawable/ic_done_24dp"
|
||||
android:title="@string/action_mark_as_read"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_mark_as_unread"
|
||||
android:icon="@drawable/ic_done_outline_24dp"
|
||||
android:title="@string/action_mark_as_unread"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_mark_previous_as_read"
|
||||
android:icon="@drawable/ic_done_prev_24dp"
|
||||
android:title="@string/action_mark_previous_as_read"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
android:icon="@drawable/ic_share_24dp"
|
||||
android:title="@string/action_share"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/action_save_cover"
|
||||
android:icon="@drawable/ic_save_24dp"
|
||||
|
|
|
@ -7,34 +7,34 @@
|
|||
android:icon="@drawable/ic_label_24dp"
|
||||
android:title="@string/action_move_category"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_download_unread"
|
||||
android:icon="@drawable/ic_get_app_24dp"
|
||||
android:title="@string/action_download_unread"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_mark_as_read"
|
||||
android:icon="@drawable/ic_done_24dp"
|
||||
android:title="@string/action_mark_as_read"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_mark_as_unread"
|
||||
android:icon="@drawable/ic_done_outline_24dp"
|
||||
android:title="@string/action_mark_as_unread"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_delete"
|
||||
android:icon="@drawable/ic_delete_24dp"
|
||||
android:title="@string/action_delete"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_change_source"
|
||||
android:icon="@drawable/ic_filter_list_24dp"
|
||||
android:title="@string/action_filter"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
|
||||
</menu>
|
|
@ -7,41 +7,41 @@
|
|||
android:icon="@drawable/ic_get_app_24dp"
|
||||
android:title="@string/action_download"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_delete"
|
||||
android:icon="@drawable/ic_delete_24dp"
|
||||
android:title="@string/action_delete"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_bookmark"
|
||||
android:icon="@drawable/ic_bookmark_border_24dp"
|
||||
android:title="@string/action_bookmark"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_remove_bookmark"
|
||||
android:icon="@drawable/ic_bookmark_24dp"
|
||||
android:title="@string/action_remove_bookmark"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_mark_as_read"
|
||||
android:icon="@drawable/ic_done_24dp"
|
||||
android:title="@string/action_mark_as_read"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_mark_as_unread"
|
||||
android:icon="@drawable/ic_done_outline_24dp"
|
||||
android:title="@string/action_mark_as_unread"
|
||||
app:iconTint="?attr/colorOnToolbar"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Reader Theme -->
|
||||
<color name="reader_toolbar">#BF212121</color>
|
||||
|
||||
</resources>
|
|
@ -55,13 +55,6 @@
|
|||
<item>@string/zoom_start_center</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="zoom_start_values">
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="rotation_type">
|
||||
<item>@string/label_default</item>
|
||||
<item>@string/rotation_free</item>
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
<color name="accent_yinyang">#000000</color>
|
||||
<color name="color_on_secondary_yinyang">#FFFFFF</color>
|
||||
<color name="ripple_colored_yinyang">#999999</color>
|
||||
<color name="chip_text_yinyang">#000000</color>
|
||||
|
||||
<!-- Yotsuba Theme -->
|
||||
<color name="accent_yotsuba">#FC8C5C</color>
|
||||
|
|
|
@ -4,12 +4,10 @@
|
|||
|
||||
<dimen name="bottom_sheet_width">0dp</dimen>
|
||||
|
||||
<dimen name="space_between_cards">4dp</dimen>
|
||||
<dimen name="card_radius">4dp</dimen>
|
||||
<dimen name="card_selector_radius">6dp</dimen>
|
||||
<dimen name="dialog_radius">8dp</dimen>
|
||||
|
||||
<dimen name="fab_size">56dp</dimen>
|
||||
<dimen name="fab_list_padding">88dp</dimen>
|
||||
|
||||
<dimen name="action_toolbar_list_padding">72dp</dimen>
|
||||
|
|
|
@ -256,7 +256,6 @@
|
|||
<string name="ext_unofficial">Unofficial</string>
|
||||
<string name="ext_untrusted">Untrusted</string>
|
||||
<string name="ext_uninstall">Uninstall</string>
|
||||
<string name="ext_available">Available</string>
|
||||
<string name="ext_app_info">App info</string>
|
||||
<string name="untrusted_extension">Untrusted extension</string>
|
||||
<string name="untrusted_extension_message">This extension was signed with an untrusted certificate and wasn\'t activated.\n\nA malicious extension could read any login credentials stored in Tachiyomi or execute arbitrary code.\n\nBy trusting this certificate you accept these risks.</string>
|
||||
|
@ -282,7 +281,6 @@
|
|||
<string name="pref_dual_page_invert">Invert dual page split placement</string>
|
||||
<string name="pref_dual_page_invert_summary">If the placement of the dual page split doesn\'t match reading direction</string>
|
||||
<string name="pref_cutout_short">Show content in cutout area</string>
|
||||
<string name="pref_lock_orientation">Lock orientation</string>
|
||||
<string name="pref_page_transitions">Animate page transitions</string>
|
||||
<string name="pref_double_tap_anim_speed">Double tap animation speed</string>
|
||||
<string name="pref_show_page_number">Show page number</string>
|
||||
|
@ -511,7 +509,6 @@
|
|||
<string name="username">Username</string>
|
||||
<string name="email">Email address</string>
|
||||
<string name="password">Password</string>
|
||||
<string name="show_password">Show password</string>
|
||||
<string name="login">Login</string>
|
||||
<string name="login_success">Logged in</string>
|
||||
<string name="logout_title">Log out from %1$s?</string>
|
||||
|
|
Loading…
Reference in a new issue