mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Fix background on the migration bottom sheet
needs to be a 2 tone thing since a14's back gesture exist
This commit is contained in:
parent
51fcfc70e6
commit
7b9985419c
2 changed files with 17 additions and 0 deletions
|
@ -4,6 +4,7 @@ import android.app.Activity
|
|||
import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.CheckBox
|
||||
import android.widget.CompoundButton
|
||||
|
@ -12,6 +13,7 @@ import android.widget.RadioButton
|
|||
import android.widget.RadioGroup
|
||||
import android.widget.Toast
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.children
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.view.updateLayoutParams
|
||||
|
@ -70,6 +72,11 @@ class MigrationBottomSheetDialog(
|
|||
},
|
||||
activity,
|
||||
)
|
||||
val contentView = binding.root
|
||||
(contentView.parent as View).background = ContextCompat.getDrawable(context, R.drawable.bg_sheet_gradient)
|
||||
contentView.post {
|
||||
(contentView.parent as View).background = ContextCompat.getDrawable(context, R.drawable.bg_sheet_gradient)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
10
app/src/main/res/drawable/bg_sheet_gradient.xml
Normal file
10
app/src/main/res/drawable/bg_sheet_gradient.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:centerX="-100.0"
|
||||
android:startColor="?background"
|
||||
android:type="sweep"
|
||||
android:endColor="#00000000"/>
|
||||
</shape>
|
Loading…
Add table
Add a link
Reference in a new issue