1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-3300 Expand bottom sheet in landscape mode in base fragments

This commit is contained in:
nvgurova 2025-02-17 13:44:45 +01:00
parent 88335a10ed
commit ff559ebc02
No known key found for this signature in database
GPG key ID: 3283F7371DE9C0D2
3 changed files with 9 additions and 2 deletions

View file

@ -32,8 +32,7 @@
android:name="com.anytypeio.anytype.ui.main.MainActivity"
android:exported="true"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait">
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

View file

@ -1,5 +1,6 @@
package com.anytypeio.anytype.core_utils.ui
import android.content.res.Configuration.ORIENTATION_LANDSCAPE
import android.os.Bundle
import android.view.View
import androidx.annotation.IdRes
@ -53,6 +54,9 @@ abstract class BaseBottomSheetComposeFragment : BottomSheetDialogFragment() {
override fun onStart() {
super.onStart()
if (resources.configuration.orientation == ORIENTATION_LANDSCAPE) {
expand()
}
proceed(throttleFlow.throttleFirst(LONG_THROTTLE_DURATION)) { it() }
}

View file

@ -1,5 +1,6 @@
package com.anytypeio.anytype.core_utils.ui
import android.content.res.Configuration.ORIENTATION_LANDSCAPE
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
@ -60,6 +61,9 @@ abstract class BaseBottomSheetFragment<T : ViewBinding>(
override fun onStart() {
super.onStart()
if (resources.configuration.orientation == ORIENTATION_LANDSCAPE) {
expand()
}
proceed(throttleFlow.throttleFirst(LONG_THROTTLE_DURATION)) { it() }
}