fixed media viewer theme color

This commit is contained in:
Mariotaku Lee 2016-03-21 09:17:46 +08:00
parent dd716b7a07
commit 8a0e03ca09
3 changed files with 20 additions and 9 deletions

View File

@ -21,8 +21,8 @@ android {
applicationId "org.mariotaku.twidere" applicationId "org.mariotaku.twidere"
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 23 targetSdkVersion 23
versionCode 164 versionCode 165
versionName "3.1.0.7" versionName "3.1.0.8"
multiDexEnabled true multiDexEnabled true
generatedDensities = [] generatedDensities = []

View File

@ -93,7 +93,6 @@ import org.mariotaku.twidere.util.AsyncTaskUtils;
import org.mariotaku.twidere.util.IntentUtils; import org.mariotaku.twidere.util.IntentUtils;
import org.mariotaku.twidere.util.MenuUtils; import org.mariotaku.twidere.util.MenuUtils;
import org.mariotaku.twidere.util.PermissionUtils; import org.mariotaku.twidere.util.PermissionUtils;
import org.mariotaku.twidere.util.ThemeUtils;
import org.mariotaku.twidere.util.Utils; import org.mariotaku.twidere.util.Utils;
import org.mariotaku.twidere.util.dagger.GeneralComponentHelper; import org.mariotaku.twidere.util.dagger.GeneralComponentHelper;
import org.mariotaku.twidere.util.media.MediaExtra; import org.mariotaku.twidere.util.media.MediaExtra;
@ -145,11 +144,6 @@ public final class MediaViewerActivity extends AbsMediaViewerActivity implements
actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true);
} }
@Nullable
public String getATEKey() {
return ThemeUtils.getATEKey(this);
}
@Override @Override
protected void onStart() { protected void onStart() {
super.onStart(); super.onStart();
@ -175,7 +169,7 @@ public final class MediaViewerActivity extends AbsMediaViewerActivity implements
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
ATE.invalidateActivity(this, this.updateTime, this.getATEKey()); ATE.invalidateActivity(this, this.updateTime, getATEKey());
} }
@Override @Override
@ -203,6 +197,11 @@ public final class MediaViewerActivity extends AbsMediaViewerActivity implements
} }
} }
@Nullable
public String getATEKey() {
return VALUE_THEME_NAME_DARK;
}
public void processShareIntent(Intent intent) { public void processShareIntent(Intent intent) {
if (!hasStatus()) return; if (!hasStatus()) return;
final ParcelableStatus status = getStatus(); final ParcelableStatus status = getStatus();

View File

@ -175,6 +175,13 @@ public class TwidereApplication extends Application implements Constants,
.coloredActionBar(false) .coloredActionBar(false)
.commit(); .commit();
} }
if (!ATE.config(this, null).isConfigured()) {
ATE.config(this, null)
.accentColor(themeColor)
.coloredActionBar(false)
.coloredStatusBar(false)
.commit();
}
resetTheme(preferences); resetTheme(preferences);
super.onCreate(); super.onCreate();
initializeAsyncTask(); initializeAsyncTask();
@ -345,6 +352,11 @@ public class TwidereApplication extends Application implements Constants,
.coloredActionBar(false) .coloredActionBar(false)
.coloredStatusBar(false) .coloredStatusBar(false)
.commit(); .commit();
ATE.config(this, null)
.accentColor(themeColor)
.coloredActionBar(false)
.coloredStatusBar(false)
.commit();
break; break;
} }
} }