From 158970673ed552e9343f76cec93701a3d01e5c69 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 27 Dec 2022 17:10:51 +0100 Subject: [PATCH] updating some main screen ui --- .../voicerecorder/activities/MainActivity.kt | 5 ++++- app/src/main/res/layout/activity_main.xml | 22 ++++++------------- app/src/main/res/menu/menu.xml | 2 +- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt index 281235d..8381211 100644 --- a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt @@ -19,12 +19,15 @@ import me.grantland.widget.AutofitHelper class MainActivity : SimpleActivity() { override fun onCreate(savedInstanceState: Bundle?) { + isMaterialActivity = true super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) appLaunched(BuildConfig.APPLICATION_ID) setupOptionsMenu() refreshMenuItems() + updateMaterialActivityViews(main_coordinator, main_holder, false) + if (checkAppSideloading()) { return } @@ -51,7 +54,7 @@ class MainActivity : SimpleActivity() { override fun onResume() { super.onResume() setupTabColors() - setupToolbar(main_toolbar) + setupToolbar(main_toolbar, statusBarColor = getProperBackgroundColor()) getPagerAdapter()?.onResume() } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index d9e067b..54a2241 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -5,27 +5,19 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - - + android:layout_height="?attr/actionBarSize" + android:background="@color/color_primary" + app:menu="@menu/menu" + app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" /> + android:layout_marginTop="?attr/actionBarSize"> + app:showAsAction="always" />