diff options
author | Scott Warner <Tortel1210@gmail.com> | 2020-06-24 15:38:56 -0400 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-12-12 01:23:35 +0200 |
commit | f5251dc6b9f65a458114c266ce11757184fc22a1 (patch) | |
tree | 4db56aa3372c48e08d104d7aba3ab201554dc587 /java | |
parent | 97cca091f467918df80ab0553365a0aff158d9c3 (diff) |
Dialer: Use a DayNight launch theme
This prevents the white launch screen from appearing when the system theme
is dark
Change-Id: I1ee8ff493910578b5e5c9de67ea1f7390178051a
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/dialer/main/impl/AndroidManifest.xml | 2 | ||||
-rw-r--r-- | java/com/android/dialer/main/impl/MainActivity.java | 2 | ||||
-rw-r--r-- | java/com/android/dialer/main/impl/res/values/styles.xml | 7 |
3 files changed, 10 insertions, 1 deletions
diff --git a/java/com/android/dialer/main/impl/AndroidManifest.xml b/java/com/android/dialer/main/impl/AndroidManifest.xml index a1ed5eb9e..55eea5d66 100644 --- a/java/com/android/dialer/main/impl/AndroidManifest.xml +++ b/java/com/android/dialer/main/impl/AndroidManifest.xml @@ -30,7 +30,7 @@ android:label="@string/main_activity_label" android:launchMode="singleTask" android:resizeableActivity="true" - android:theme="@style/MainActivityTheme" + android:theme="@style/LaunchTheme" android:windowSoftInputMode="stateAlwaysHidden|adjustNothing"> <intent-filter> diff --git a/java/com/android/dialer/main/impl/MainActivity.java b/java/com/android/dialer/main/impl/MainActivity.java index 1129609ed..f539bdcee 100644 --- a/java/com/android/dialer/main/impl/MainActivity.java +++ b/java/com/android/dialer/main/impl/MainActivity.java @@ -29,6 +29,7 @@ import com.android.dialer.interactions.PhoneNumberInteraction.InteractionErrorCo import com.android.dialer.interactions.PhoneNumberInteraction.InteractionErrorListener; import com.android.dialer.main.MainActivityPeer; import com.android.dialer.main.impl.bottomnav.BottomNavBar.TabIndex; +import com.android.dialer.R; import com.android.dialer.util.TransactionSafeActivity; /** This is the main activity for dialer. It hosts favorites, call log, search, dialpad, etc... */ @@ -72,6 +73,7 @@ public class MainActivity extends TransactionSafeActivity @Override protected void onCreate(Bundle savedInstanceState) { + setTheme(R.style.MainActivityTheme); super.onCreate(savedInstanceState); LogUtil.enterBlock("MainActivity.onCreate"); // If peer was set by the super, don't reset it. diff --git a/java/com/android/dialer/main/impl/res/values/styles.xml b/java/com/android/dialer/main/impl/res/values/styles.xml index 25f247e15..139b8b249 100644 --- a/java/com/android/dialer/main/impl/res/values/styles.xml +++ b/java/com/android/dialer/main/impl/res/values/styles.xml @@ -16,6 +16,13 @@ --> <resources> + <style name="LaunchTheme" parent="Theme.AppCompat.DayNight.DarkActionBar"> + <item name="android:colorPrimary">@color/dialer_theme_color</item> + <item name="colorPrimary">@color/dialer_theme_color</item> + <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item> + <item name="colorPrimaryDark">@color/dialer_theme_color_dark</item> + </style> + <!-- Activities should use this theme as their style --> <style name="MainActivityTheme" parent="MainActivityThemeBase"/> |