[automerger] Defining a base theme, which can be overriden by derivative projects without affecting launcher theme am: bd88f396dc
Change-Id: I495b62832a9effdef6dc9ff779d92158f8be0aad
This commit is contained in:
commit
7f46327c04
|
@ -56,7 +56,7 @@
|
|||
android:hardwareAccelerated="true"
|
||||
android:icon="@drawable/ic_launcher_home"
|
||||
android:label="@string/derived_app_name"
|
||||
android:theme="@style/LauncherTheme"
|
||||
android:theme="@style/AppTheme"
|
||||
android:largeHeap="@bool/config_largeHeap"
|
||||
android:restoreAnyVersion="true"
|
||||
android:supportsRtl="true" >
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
android:hardwareAccelerated="true"
|
||||
android:icon="@drawable/ic_launcher_home"
|
||||
android:label="@string/derived_app_name"
|
||||
android:theme="@style/LauncherTheme"
|
||||
android:theme="@style/AppTheme"
|
||||
android:largeHeap="@bool/config_largeHeap"
|
||||
android:restoreAnyVersion="true"
|
||||
android:supportsRtl="true" >
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<style name="WidgetContainerTheme" parent="@android:style/Theme.DeviceDefault.Settings">
|
||||
<item name="android:colorEdgeEffect">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
<style name="WidgetContainerTheme.Dark" parent="LauncherThemeDark">
|
||||
<style name="WidgetContainerTheme.Dark" parent="AppTheme.Dark">
|
||||
<item name="android:colorEdgeEffect">?android:attr/textColorSecondary</item>
|
||||
<item name="android:colorPrimaryDark">#616161</item> <!-- Gray 700 -->
|
||||
</style>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<item name="workspaceStatusBarScrim">@null</item>
|
||||
</style>
|
||||
|
||||
<style name="LauncherThemeDark" parent="@style/LauncherTheme">
|
||||
<style name="LauncherTheme.Dark" parent="@style/LauncherTheme">
|
||||
<item name="android:textColorPrimary">#FFFFFFFF</item>
|
||||
<item name="android:textColorSecondary">#FFFFFFFF</item>
|
||||
<item name="android:textColorTertiary">#CCFFFFFF</item>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<item name="isMainColorDark">true</item>
|
||||
</style>
|
||||
|
||||
<style name="LauncherThemeDark.DarKText" parent="@style/LauncherThemeDark">
|
||||
<style name="LauncherTheme.Dark.DarkText" parent="@style/LauncherTheme.Dark">
|
||||
<item name="allAppsInterimScrimAlpha">25</item>
|
||||
<item name="workspaceTextColor">#FF212121</item>
|
||||
<item name="workspaceShadowColor">@android:color/transparent</item>
|
||||
|
@ -83,6 +83,13 @@
|
|||
<item name="workspaceStatusBarScrim">@null</item>
|
||||
</style>
|
||||
|
||||
<!-- A derivative project can extend these themes to customize the application theme without
|
||||
affecting the base theme -->
|
||||
<style name="AppTheme" parent="@style/LauncherTheme" />
|
||||
<style name="AppTheme.DarkText" parent="@style/LauncherTheme.DarkText" />
|
||||
<style name="AppTheme.Dark" parent="@style/LauncherTheme.Dark" />
|
||||
<style name="AppTheme.Dark.DarkText" parent="@style/LauncherTheme.Dark.DarkText" />
|
||||
|
||||
<!--
|
||||
Theme overrides to element on homescreen, i.e., which are drawn on top on wallpaper.
|
||||
Various foreground colors are overridden to be workspaceTextColor so that they are properly
|
||||
|
|
|
@ -61,7 +61,7 @@ public abstract class BaseDraggingActivity extends BaseActivity
|
|||
|
||||
private OnStartCallback mOnStartCallback;
|
||||
|
||||
private int mThemeRes = R.style.LauncherTheme;
|
||||
private int mThemeRes = R.style.AppTheme;
|
||||
|
||||
private DisplayRotationListener mRotationListener;
|
||||
|
||||
|
@ -91,10 +91,10 @@ public abstract class BaseDraggingActivity extends BaseActivity
|
|||
protected int getThemeRes(WallpaperColorInfo wallpaperColorInfo) {
|
||||
if (wallpaperColorInfo.isDark()) {
|
||||
return wallpaperColorInfo.supportsDarkText() ?
|
||||
R.style.LauncherThemeDark_DarKText : R.style.LauncherThemeDark;
|
||||
R.style.AppTheme_Dark_DarkText : R.style.AppTheme_Dark;
|
||||
} else {
|
||||
return wallpaperColorInfo.supportsDarkText() ?
|
||||
R.style.LauncherTheme_DarkText : R.style.LauncherTheme;
|
||||
R.style.AppTheme_DarkText : R.style.AppTheme;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue