add dark theme to PassphrasePromptActivity

Fixes #2296

Closes #2307
Closes #2627
This commit is contained in:
agrajaghh
2015-03-09 00:32:57 +01:00
committed by Moxie Marlinspike
parent 01bebf2176
commit 257660200a
33 changed files with 51 additions and 21 deletions

View File

@@ -0,0 +1,16 @@
package org.thoughtcrime.securesms.util;
import android.app.Activity;
import org.thoughtcrime.securesms.R;
public class DynamicIntroTheme extends DynamicTheme {
@Override
protected int getSelectedTheme(Activity activity) {
String theme = TextSecurePreferences.getTheme(activity);
if (theme.equals("dark")) return R.style.TextSecure_DarkIntroTheme;
return R.style.TextSecure_LightIntroTheme;
}
}

View File

@@ -2,11 +2,7 @@ package org.thoughtcrime.securesms.util;
import android.app.Activity;
import android.content.Intent;
import android.preference.PreferenceManager;
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
import org.thoughtcrime.securesms.ConversationActivity;
import org.thoughtcrime.securesms.ConversationListActivity;
import org.thoughtcrime.securesms.R;
public class DynamicTheme {
@@ -28,7 +24,7 @@ public class DynamicTheme {
}
}
private static int getSelectedTheme(Activity activity) {
protected int getSelectedTheme(Activity activity) {
String theme = TextSecurePreferences.getTheme(activity);
if (theme.equals("dark")) return R.style.TextSecure_DarkTheme;