Update some themes

This commit is contained in:
arkon 2020-06-13 15:34:55 -04:00
parent 763c4522b7
commit 526e029ebb
4 changed files with 7 additions and 6 deletions

View File

@ -2,13 +2,11 @@
package eu.kanade.tachiyomi.util.view
import android.graphics.Color
import android.graphics.Point
import android.view.Gravity
import android.view.Menu
import android.view.MenuItem
import android.view.View
import android.widget.TextView
import androidx.annotation.MenuRes
import androidx.appcompat.widget.PopupMenu
import androidx.recyclerview.widget.RecyclerView
@ -35,8 +33,6 @@ fun View.getCoordinates() = Point((left + right) / 2, (top + bottom) / 2)
*/
inline fun View.snack(message: String, length: Int = Snackbar.LENGTH_LONG, f: Snackbar.() -> Unit = {}): Snackbar {
val snack = Snackbar.make(this, message, length)
val textView: TextView = snack.view.findViewById(com.google.android.material.R.id.snackbar_text)
textView.setTextColor(Color.WHITE)
snack.f()
snack.show()
return snack

View File

@ -24,7 +24,7 @@
android:tint="?attr/colorAccent"
app:srcCompat="@drawable/ic_chevron_left_black_24dp" />
<EditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/myNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@ -181,9 +181,11 @@
<style name="Theme.Widget.Snackbar" parent="Widget.MaterialComponents.Snackbar">
<item name="android:background">@drawable/snackbar_bg</item>
<item name="android:textAppearance">@style/TextAppearance.Widget.Menu</item>
<item name="actionTextColorAlpha">1</item>
</style>
<style name="Theme.Widget.Snackbar.TextView" parent="@style/Widget.MaterialComponents.Snackbar.TextView">
<item name="android:textColor">?attr/colorOnSurface</item>
</style>
<style name="Theme.Widget.Chip" parent="Widget.MaterialComponents.Chip.Action">

View File

@ -54,7 +54,9 @@
<item name="alertDialogTheme">@style/Theme.AlertDialog.Dark</item>
<item name="chipStyle">@style/Theme.Widget.Chip</item>
<item name="buttonStyle">@style/Theme.Widget.Button</item>
<item name="snackbarStyle">@style/Theme.Widget.Snackbar</item>
<item name="snackbarButtonStyle">@style/Theme.Widget.Button</item>
<item name="snackbarTextViewStyle">@style/Theme.Widget.Snackbar.TextView</item>
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>
@ -138,6 +140,7 @@
<item name="buttonStyle">@style/Theme.Widget.Button</item>
<item name="snackbarStyle">@style/Theme.Widget.Snackbar</item>
<item name="snackbarButtonStyle">@style/Theme.Widget.Button</item>
<item name="snackbarTextViewStyle">@style/Theme.Widget.Snackbar.TextView</item>
<item name="textAppearanceButton">@style/TextAppearance.Widget.Button</item>
<item name="textInputStyle">@style/Theme.Widget.TextInputLayout.OutlinedBox</item>
<item name="android:itemTextAppearance">@style/TextAppearance.Widget.Menu</item>