fixed #579 (hopefully)

This commit is contained in:
Mariotaku Lee 2016-07-07 11:48:37 +08:00
parent 1a783164b4
commit 40d79d0113
2 changed files with 5 additions and 4 deletions

View File

@ -28,8 +28,8 @@ android {
applicationId "org.mariotaku.twidere" applicationId "org.mariotaku.twidere"
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 24 targetSdkVersion 24
versionCode 199 versionCode 200
versionName "3.1.10" versionName "3.1.11"
multiDexEnabled true multiDexEnabled true
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("false")' buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("false")'

View File

@ -104,8 +104,9 @@ public class ThemeUtils implements Constants {
} }
public static void applyWindowBackground(@NonNull Context context, @NonNull Window window, String option, int alpha) { public static void applyWindowBackground(@NonNull Context context, @NonNull Window window, String option, int alpha) {
if (isWindowFloating(context)) return; if (isWindowFloating(context)) {
if (VALUE_THEME_BACKGROUND_TRANSPARENT.equals(option)) { window.setBackgroundDrawable(getWindowBackground(context));
} else if (VALUE_THEME_BACKGROUND_TRANSPARENT.equals(option)) {
window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER); window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER);
window.setBackgroundDrawable(getWindowBackgroundFromThemeApplyAlpha(context, alpha)); window.setBackgroundDrawable(getWindowBackgroundFromThemeApplyAlpha(context, alpha));
} else if (VALUE_THEME_BACKGROUND_SOLID.equals(option)) { } else if (VALUE_THEME_BACKGROUND_SOLID.equals(option)) {