themes: Switch to single theme for all activities
Default to NoActionBar theme and use toolbar where required Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
parent
12fb4d13d4
commit
412ed9ee16
5 changed files with 21 additions and 21 deletions
|
@ -105,7 +105,6 @@
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.storage.StorageActivity"
|
android:name=".ui.storage.StorageActivity"
|
||||||
android:theme="@style/AppTheme.NoActionBar"
|
|
||||||
android:windowSoftInputMode="adjustResize" />
|
android:windowSoftInputMode="adjustResize" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
@ -115,15 +114,13 @@
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.recoverycode.RecoveryCodeActivity"
|
android:name=".ui.recoverycode.RecoveryCodeActivity"
|
||||||
android:label="@string/recovery_code_title"
|
android:label="@string/recovery_code_title" />
|
||||||
android:theme="@style/AppTheme.NoActionBar" />
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".restore.RestoreActivity"
|
android:name=".restore.RestoreActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/restore_title"
|
android:label="@string/restore_title"
|
||||||
android:permission="com.stevesoltys.seedvault.RESTORE_BACKUP"
|
android:permission="com.stevesoltys.seedvault.RESTORE_BACKUP">
|
||||||
android:theme="@style/AppTheme.NoActionBar">
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.stevesoltys.seedvault.RESTORE_BACKUP" />
|
<action android:name="com.stevesoltys.seedvault.RESTORE_BACKUP" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
|
@ -34,6 +34,7 @@ class SettingsActivity : RequireProvisioningActivity(), OnPreferenceStartFragmen
|
||||||
|
|
||||||
setContentView(R.layout.activity_fragment_container)
|
setContentView(R.layout.activity_fragment_container)
|
||||||
|
|
||||||
|
setSupportActionBar(requireViewById(R.id.toolbar))
|
||||||
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
|
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
// always start with settings fragment as a base (when fresh start)
|
// always start with settings fragment as a base (when fresh start)
|
||||||
|
|
|
@ -3,7 +3,21 @@
|
||||||
SPDX-FileCopyrightText: 2020 The Calyx Institute
|
SPDX-FileCopyrightText: 2020 The Calyx Institute
|
||||||
SPDX-License-Identifier: Apache-2.0
|
SPDX-License-Identifier: Apache-2.0
|
||||||
-->
|
-->
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
android:theme="?attr/actionBarTheme" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
android:id="@+id/fragment"
|
android:id="@+id/fragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
<color name="primaryDark">@color/primary</color>
|
<color name="primaryDark">@color/primary</color>
|
||||||
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#52 -->
|
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#52 -->
|
||||||
<color name="background">@android:color/system_neutral1_50</color>
|
<color name="background">@android:color/system_neutral1_50</color>
|
||||||
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#21 -->
|
|
||||||
<color name="actionBarPrimary">@color/primary</color>
|
|
||||||
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#23 -->
|
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#23 -->
|
||||||
<color name="statusBarColor">@color/primary</color>
|
<color name="statusBarColor">@color/primary</color>
|
||||||
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#69 -->
|
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#69 -->
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<style name="AppTheme" parent="@style/Theme.AppCompat.DayNight">
|
<style name="AppTheme" parent="@style/Theme.AppCompat.DayNight.NoActionBar">
|
||||||
<item name="colorPrimary">@color/primary</item>
|
<item name="colorPrimary">@color/primary</item>
|
||||||
<item name="colorPrimaryDark">@color/primaryDark</item>
|
<item name="colorPrimaryDark">@color/primaryDark</item>
|
||||||
<item name="colorAccent">@color/accent</item>
|
<item name="colorAccent">@color/accent</item>
|
||||||
|
@ -14,20 +14,10 @@
|
||||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
||||||
<item name="android:windowLightStatusBar">@bool/isLight</item>
|
<item name="android:windowLightStatusBar">@bool/isLight</item>
|
||||||
<item name="android:statusBarColor">@color/statusBarColor</item>
|
<item name="android:statusBarColor">@color/statusBarColor</item>
|
||||||
<item name="actionBarTheme">@style/Theme.ActionBar</item>
|
|
||||||
<item name="android:windowLightNavigationBar">@bool/isLight</item>
|
<item name="android:windowLightNavigationBar">@bool/isLight</item>
|
||||||
<item name="android:navigationBarColor">@color/primary</item>
|
<item name="android:navigationBarColor">@color/primary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.ActionBar" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
|
||||||
<item name="colorPrimary">@color/actionBarPrimary</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="AppTheme.NoActionBar" parent="AppTheme">
|
|
||||||
<item name="windowActionBar">false</item>
|
|
||||||
<item name="windowNoTitle">true</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<!-- Copied from Settings -->
|
<!-- Copied from Settings -->
|
||||||
<style name="ActionPrimaryButton" parent="android:Widget.DeviceDefault.Button.Colored" />
|
<style name="ActionPrimaryButton" parent="android:Widget.DeviceDefault.Button.Colored" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue