Bottom sheet improvements
parent
21f7b7120a
commit
0932507346
@ -0,0 +1,15 @@
|
|||||||
|
package org.koitharu.kotatsu.utils.ext
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.os.Build
|
||||||
|
import android.view.Display
|
||||||
|
import android.view.WindowManager
|
||||||
|
import androidx.core.content.getSystemService
|
||||||
|
|
||||||
|
val Context.displayCompat: Display?
|
||||||
|
get() = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
|
display
|
||||||
|
} else {
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
getSystemService<WindowManager>()?.defaultDisplay
|
||||||
|
}
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:duration="300"
|
||||||
|
android:interpolator="@android:interpolator/fast_out_slow_in">
|
||||||
|
|
||||||
|
<translate
|
||||||
|
android:fromYDelta="100%p"
|
||||||
|
android:toYDelta="0" />
|
||||||
|
|
||||||
|
</set>
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:duration="300"
|
||||||
|
android:interpolator="@android:interpolator/fast_out_slow_in">
|
||||||
|
|
||||||
|
<translate
|
||||||
|
android:fromYDelta="0"
|
||||||
|
android:toYDelta="100%p" />
|
||||||
|
|
||||||
|
</set>
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item
|
||||||
|
android:left="-2dp"
|
||||||
|
android:right="-2dp"
|
||||||
|
android:top="-2dp">
|
||||||
|
<shape>
|
||||||
|
<solid android:color="@android:color/transparent" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="?android:attr/divider" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
Loading…
Reference in New Issue