mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-24 03:42:15 +00:00
Update: Make repository sheet expand to ful screen
This commit is contained in:
parent
6ed4a2eb6f
commit
9027294e32
@ -9,6 +9,7 @@ import android.text.style.TypefaceSpan
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||
@ -48,8 +49,19 @@ class RepositorySheetX() : BottomSheetDialogFragment() {
|
||||
private val syncConnection = Connection(SyncService::class.java)
|
||||
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val sheet = super.onCreateDialog(savedInstanceState) as BottomSheetDialog
|
||||
sheet.behavior.state = BottomSheetBehavior.STATE_EXPANDED
|
||||
val sheet = super.onCreateDialog(savedInstanceState)
|
||||
sheet.setOnShowListener {
|
||||
val bsd = it as BottomSheetDialog
|
||||
val parentLayout =
|
||||
bsd.findViewById<View>(com.google.android.material.R.id.design_bottom_sheet)
|
||||
parentLayout?.let { view ->
|
||||
val behaviour = BottomSheetBehavior.from(view)
|
||||
val layoutParams = view.layoutParams
|
||||
layoutParams.height = WindowManager.LayoutParams.MATCH_PARENT
|
||||
view.layoutParams = layoutParams
|
||||
behaviour.state = BottomSheetBehavior.STATE_EXPANDED
|
||||
}
|
||||
}
|
||||
return sheet
|
||||
}
|
||||
|
||||
|
@ -19,14 +19,12 @@
|
||||
|
||||
<com.google.android.material.circularreveal.CircularRevealFrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:paddingHorizontal="12dp">
|
||||
android:layout_height="match_parent"
|
||||
android:padding="12dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
@ -169,6 +167,11 @@
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
Loading…
x
Reference in New Issue
Block a user