mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-22 13:49:14 +01:00
Update dialogs' drag handle to use BottomSheetDragHandleView
This commit is contained in:
parent
2bcf0e2abd
commit
ee2716403e
@ -11,14 +11,16 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.transition.TransitionManager
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||
import emu.skyline.R
|
||||
import com.google.android.material.bottomsheet.BottomSheetDragHandleView
|
||||
|
||||
class DragIndicatorView : androidx.appcompat.widget.AppCompatImageView {
|
||||
/**
|
||||
* A [BottomSheetDragHandleView] that hides itself when the bottom sheet is expanded full-screen
|
||||
*/
|
||||
class DragHandleView : BottomSheetDragHandleView {
|
||||
private val visibilityCallback = DragIndicatorCallback()
|
||||
private var callbackAttached = false
|
||||
|
||||
init {
|
||||
setImageResource(R.drawable.drag_indicator)
|
||||
isFocusable = false
|
||||
isClickable = false
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<size
|
||||
android:width="42dp"
|
||||
android:height="4dp" />
|
||||
<solid android:color="@color/onBackgroundLight" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
@ -6,11 +6,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<emu.skyline.views.DragIndicatorView
|
||||
<emu.skyline.views.DragHandleView
|
||||
android:id="@+id/drag_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp" />
|
||||
android:minHeight="40dp"
|
||||
android:paddingBottom="12dp" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -10,10 +10,11 @@
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="2.5dp">
|
||||
|
||||
<emu.skyline.views.DragIndicatorView
|
||||
<emu.skyline.views.DragHandleView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="8dp" />
|
||||
android:minHeight="40dp"
|
||||
android:paddingBottom="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/library_title"
|
||||
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="onBackgroundLight">#1AFFFFFF</color>
|
||||
</resources>
|
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="logoBackground">#121212</color>
|
||||
<color name="onBackgroundLight">#1E000000</color>
|
||||
|
||||
<color name="colorPerfStatsPrimary">#9FFFFF00</color>
|
||||
<color name="colorPerfStatsSecondary">#9F00FFFF</color>
|
||||
|
Loading…
Reference in New Issue
Block a user