From 0d4d3e4504f3a9ee52340935cf770f2013c91edf Mon Sep 17 00:00:00 2001 From: Anton Chekulaev Date: Thu, 3 Sep 2020 10:58:09 +1000 Subject: [PATCH 1/2] Flat action bar style for create private chat and join public chat activities. --- AndroidManifest.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index f34234853b..a44568a9e8 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -135,7 +135,8 @@ android:theme="@style/Theme.Session.DayNight.FlatActionBar"/> + android:screenOrientation="portrait" + android:theme="@style/Theme.Session.DayNight.FlatActionBar"/> @@ -145,7 +146,8 @@ + android:windowSoftInputMode="adjustResize" + android:theme="@style/Theme.Session.DayNight.FlatActionBar" /> From 5d6b23bae23d728a75145d16af9523ac3311296d Mon Sep 17 00:00:00 2001 From: Anton Chekulaev Date: Thu, 3 Sep 2020 11:34:49 +1000 Subject: [PATCH 2/2] Light theme feature intro bottom sheet is expanded by default. --- .../LightThemeFeatureIntroBottomSheet.kt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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