Theme Support

1) Broke out the UI elements of the major Activites into stylable
   attributes.

2) Created a 'light' and 'dark' theme for the newly stylable attrs.

3) Touched up some of the UI spacing.

4) Implemented dynamic theme switching support.
This commit is contained in:
Moxie Marlinspike
2013-06-21 11:56:59 -07:00
parent 2ffc70a95b
commit 5263ac1f1a
62 changed files with 443 additions and 156 deletions

View File

@@ -17,11 +17,13 @@
package org.thoughtcrime.securesms;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
import org.thoughtcrime.securesms.crypto.SerializableKey;
import org.thoughtcrime.securesms.util.Base64;
import org.thoughtcrime.securesms.util.Dialogs;
import org.thoughtcrime.securesms.util.DynamicTheme;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
@@ -36,6 +38,20 @@ import com.google.zxing.integration.android.IntentResult;
*/
public abstract class KeyScanningActivity extends PassphraseRequiredSherlockActivity {
private final DynamicTheme dynamicTheme = new DynamicTheme();
@Override
protected void onCreate(Bundle bundle) {
dynamicTheme.onCreate(this);
super.onCreate(bundle);
}
@Override
public void onResume() {
super.onResume();
dynamicTheme.onResume(this);
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);