Some UI changes
parent
e8a225f97a
commit
7fb67be1b6
@ -1,21 +0,0 @@
|
||||
package org.koitharu.kotatsu.utils.ext
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.core.graphics.drawable.DrawableCompat
|
||||
import org.koitharu.kotatsu.R
|
||||
|
||||
fun navigationItemBackground(context: Context): Drawable? {
|
||||
// Need to inflate the drawable and CSL via AppCompatResources to work on Lollipop
|
||||
// From Google I/O repo (https://github.com/google/iosched)
|
||||
var background = AppCompatResources.getDrawable(context, R.drawable.navigation_item_background)
|
||||
if (background != null) {
|
||||
val tint = AppCompatResources.getColorStateList(
|
||||
context, R.color.navigation_item_background_tint
|
||||
)
|
||||
background = DrawableCompat.wrap(background.mutate())
|
||||
background.setTintList(tint)
|
||||
}
|
||||
return background
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.7" android:color="?attr/colorSurface" />
|
||||
</selector>
|
||||
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true">
|
||||
<inset
|
||||
android:insetLeft="@dimen/nav_item_background_inset_left"
|
||||
android:insetRight="@dimen/nav_item_background_inset_right">
|
||||
<shape>
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/nav_item_background_corner_radius_left"
|
||||
android:bottomRightRadius="@dimen/nav_item_background_corner_radius_right"
|
||||
android:topLeftRadius="@dimen/nav_item_background_corner_radius_left"
|
||||
android:topRightRadius="@dimen/nav_item_background_corner_radius_right" />
|
||||
</shape>
|
||||
</inset>
|
||||
</item>
|
||||
<item>
|
||||
<color android:color="@android:color/transparent" />
|
||||
</item>
|
||||
</selector>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Base.V23.Kotatsu" parent="Base.Theme.Kotatsu">
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Kotatsu" parent="Base.V23.Kotatsu" />
|
||||
|
||||
</resources>
|
||||
Loading…
Reference in New Issue