diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 8813a47754..a65c1bdfb0 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -136,7 +136,8 @@ android:theme="@style/Theme.Session.DayNight.FlatActionBar"/> + android:screenOrientation="portrait" + android:theme="@style/Theme.Session.DayNight.FlatActionBar"/> @@ -146,7 +147,8 @@ + android:windowSoftInputMode="adjustResize" + android:theme="@style/Theme.Session.DayNight.FlatActionBar" /> diff --git a/src/org/thoughtcrime/securesms/loki/dialogs/LightThemeFeatureIntroBottomSheet.kt b/src/org/thoughtcrime/securesms/loki/dialogs/LightThemeFeatureIntroBottomSheet.kt index d3b01412f9..4006da0aa7 100644 --- a/src/org/thoughtcrime/securesms/loki/dialogs/LightThemeFeatureIntroBottomSheet.kt +++ b/src/org/thoughtcrime/securesms/loki/dialogs/LightThemeFeatureIntroBottomSheet.kt @@ -1,14 +1,18 @@ package org.thoughtcrime.securesms.loki.dialogs +import android.app.Dialog import android.os.Bundle -import com.google.android.material.bottomsheet.BottomSheetDialogFragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.widget.FrameLayout +import com.google.android.material.bottomsheet.BottomSheetBehavior +import com.google.android.material.bottomsheet.BottomSheetDialog +import com.google.android.material.bottomsheet.BottomSheetDialogFragment import kotlinx.android.synthetic.main.fragment_light_theme_feature_intro_bottom_sheet.* -import kotlinx.android.synthetic.main.fragment_open_group_suggestion_bottom_sheet.* import network.loki.messenger.R + class LightThemeFeatureIntroBottomSheet : BottomSheetDialogFragment() { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { @@ -23,4 +27,15 @@ class LightThemeFeatureIntroBottomSheet : BottomSheetDialogFragment() { okButton.setOnClickListener { dismiss() } } + + override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { + val dialog = super.onCreateDialog(savedInstanceState) + // Make the bottom sheet be expanded by default. + dialog.setOnShowListener { + val d = dialog as BottomSheetDialog + val bottomSheet = d.findViewById(com.google.android.material.R.id.design_bottom_sheet) + BottomSheetBehavior.from(bottomSheet!!).setState(BottomSheetBehavior.STATE_EXPANDED); + } + return dialog + } } \ No newline at end of file