diff --git a/src/org/thoughtcrime/securesms/GroupCreateActivity.java b/src/org/thoughtcrime/securesms/GroupCreateActivity.java index b37e03ca5d..ad1b09d456 100644 --- a/src/org/thoughtcrime/securesms/GroupCreateActivity.java +++ b/src/org/thoughtcrime/securesms/GroupCreateActivity.java @@ -129,7 +129,6 @@ public class GroupCreateActivity extends PassphraseRequiredSherlockFragmentActiv setContentView(R.layout.group_create_activity); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - getSupportActionBar().setTitle(R.string.GroupCreateActivity_actionbar_title); selectedContacts = new HashSet(); initializeResources(); @@ -140,6 +139,7 @@ public class GroupCreateActivity extends PassphraseRequiredSherlockFragmentActiv super.onResume(); dynamicTheme.onResume(this); dynamicLanguage.onResume(this); + getSupportActionBar().setTitle(R.string.GroupCreateActivity_actionbar_title); if (!TextSecurePreferences.isPushRegistered(this)) { disableWhisperGroupUi(R.string.GroupCreateActivity_you_dont_support_push); } diff --git a/src/org/thoughtcrime/securesms/NewConversationActivity.java b/src/org/thoughtcrime/securesms/NewConversationActivity.java index 04ae7fecaf..8e11f4b2fc 100644 --- a/src/org/thoughtcrime/securesms/NewConversationActivity.java +++ b/src/org/thoughtcrime/securesms/NewConversationActivity.java @@ -32,6 +32,7 @@ import org.thoughtcrime.securesms.recipients.RecipientFactory; import org.thoughtcrime.securesms.recipients.RecipientFormattingException; import org.thoughtcrime.securesms.recipients.Recipients; import org.thoughtcrime.securesms.util.DirectoryHelper; +import org.thoughtcrime.securesms.util.DynamicLanguage; import org.thoughtcrime.securesms.util.DynamicTheme; import org.thoughtcrime.securesms.util.NumberUtil; import org.thoughtcrime.securesms.util.TextSecurePreferences; @@ -53,14 +54,16 @@ public class NewConversationActivity extends PassphraseRequiredSherlockFragmentA private final static String TAG = "ContactSelectActivity"; public final static String MASTER_SECRET_EXTRA = "master_secret"; - private final DynamicTheme dynamicTheme = new DynamicTheme(); - private MasterSecret masterSecret; + private final DynamicTheme dynamicTheme = new DynamicTheme (); + private final DynamicLanguage dynamicLanguage = new DynamicLanguage(); + private MasterSecret masterSecret; private PushContactSelectionListFragment contactsFragment; @Override protected void onCreate(Bundle icicle) { dynamicTheme.onCreate(this); + dynamicLanguage.onCreate(this); super.onCreate(icicle); getSupportActionBar().setDisplayHomeAsUpEnabled(true); @@ -73,6 +76,8 @@ public class NewConversationActivity extends PassphraseRequiredSherlockFragmentA public void onResume() { super.onResume(); dynamicTheme.onResume(this); + dynamicLanguage.onResume(this); + getSupportActionBar().setTitle(R.string.AndroidManifest__select_contacts); masterSecret = getIntent().getParcelableExtra(MASTER_SECRET_EXTRA); } diff --git a/src/org/thoughtcrime/securesms/PushContactSelectionActivity.java b/src/org/thoughtcrime/securesms/PushContactSelectionActivity.java index bf04fef501..f9b5eee8c4 100644 --- a/src/org/thoughtcrime/securesms/PushContactSelectionActivity.java +++ b/src/org/thoughtcrime/securesms/PushContactSelectionActivity.java @@ -21,6 +21,7 @@ import android.os.Bundle; import android.util.Log; import org.thoughtcrime.securesms.util.DirectoryHelper; +import org.thoughtcrime.securesms.util.DynamicLanguage; import org.thoughtcrime.securesms.util.DynamicTheme; import org.thoughtcrime.securesms.util.TextSecurePreferences; @@ -43,13 +44,15 @@ public class PushContactSelectionActivity extends PassphraseRequiredSherlockFrag private final static String TAG = "ContactSelectActivity"; public final static String PUSH_ONLY_EXTRA = "push_only"; - private final DynamicTheme dynamicTheme = new DynamicTheme(); + private final DynamicTheme dynamicTheme = new DynamicTheme (); + private final DynamicLanguage dynamicLanguage = new DynamicLanguage(); private PushContactSelectionListFragment contactsFragment; @Override protected void onCreate(Bundle icicle) { dynamicTheme.onCreate(this); + dynamicLanguage.onCreate(this); super.onCreate(icicle); getSupportActionBar().setDisplayHomeAsUpEnabled(true); @@ -62,6 +65,8 @@ public class PushContactSelectionActivity extends PassphraseRequiredSherlockFrag public void onResume() { super.onResume(); dynamicTheme.onResume(this); + dynamicLanguage.onResume(this); + getSupportActionBar().setTitle(R.string.AndroidManifest__select_contacts); } @Override diff --git a/src/org/thoughtcrime/securesms/ReviewIdentitiesActivity.java b/src/org/thoughtcrime/securesms/ReviewIdentitiesActivity.java index ab4c885729..4f3cda5ad5 100644 --- a/src/org/thoughtcrime/securesms/ReviewIdentitiesActivity.java +++ b/src/org/thoughtcrime/securesms/ReviewIdentitiesActivity.java @@ -21,15 +21,18 @@ import android.os.Bundle; import com.actionbarsherlock.app.SherlockFragmentActivity; import com.actionbarsherlock.view.MenuItem; +import org.thoughtcrime.securesms.util.DynamicLanguage; import org.thoughtcrime.securesms.util.DynamicTheme; public class ReviewIdentitiesActivity extends SherlockFragmentActivity { - private final DynamicTheme dynamicTheme = new DynamicTheme(); + private final DynamicTheme dynamicTheme = new DynamicTheme(); + private final DynamicLanguage dynamicLanguage = new DynamicLanguage(); @Override public void onCreate(Bundle bundle) { dynamicTheme.onCreate(this); + dynamicLanguage.onCreate(this); super.onCreate(bundle); setContentView(R.layout.review_identities); getSupportActionBar().setDisplayHomeAsUpEnabled(true); @@ -39,12 +42,14 @@ public class ReviewIdentitiesActivity extends SherlockFragmentActivity { public void onResume() { super.onResume(); dynamicTheme.onResume(this); + dynamicLanguage.onResume(this); + getSupportActionBar().setTitle(R.string.AndroidManifest__manage_identity_keys); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { - case android.R.id.home: finish(); return true; + case android.R.id.home: finish(); return true; } return false; diff --git a/src/org/thoughtcrime/securesms/ShareActivity.java b/src/org/thoughtcrime/securesms/ShareActivity.java index cba5b018c2..869ca07d0a 100644 --- a/src/org/thoughtcrime/securesms/ShareActivity.java +++ b/src/org/thoughtcrime/securesms/ShareActivity.java @@ -18,25 +18,16 @@ package org.thoughtcrime.securesms; import android.content.Intent; -import android.database.ContentObserver; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.provider.ContactsContract; -import android.util.Log; -import android.view.View; import android.view.WindowManager; -import android.widget.AdapterView; -import android.widget.ListView; import com.actionbarsherlock.view.Menu; import com.actionbarsherlock.view.MenuInflater; import com.actionbarsherlock.view.MenuItem; -import org.thoughtcrime.securesms.recipients.RecipientFactory; import org.thoughtcrime.securesms.recipients.Recipients; -import org.thoughtcrime.securesms.service.DirectoryRefreshListener; -import org.thoughtcrime.securesms.util.ActionBarUtil; import org.thoughtcrime.securesms.util.DynamicLanguage; import org.thoughtcrime.securesms.util.DynamicTheme; import org.thoughtcrime.securesms.util.MemoryCleaner; @@ -66,7 +57,6 @@ public class ShareActivity extends PassphraseRequiredSherlockFragmentActivity super.onCreate(icicle); setContentView(R.layout.share_activity); - ActionBarUtil.initializeDefaultActionBar(this, getSupportActionBar(), R.string.ShareActivity_share_with); initializeResources(); } @@ -81,6 +71,7 @@ public class ShareActivity extends PassphraseRequiredSherlockFragmentActivity super.onResume(); dynamicTheme.onResume(this); dynamicLanguage.onResume(this); + getSupportActionBar().setTitle(R.string.ShareActivity_share_with); } @Override diff --git a/src/org/thoughtcrime/securesms/VerifyIdentityActivity.java b/src/org/thoughtcrime/securesms/VerifyIdentityActivity.java index 3af573dd82..8fe212ba52 100644 --- a/src/org/thoughtcrime/securesms/VerifyIdentityActivity.java +++ b/src/org/thoughtcrime/securesms/VerifyIdentityActivity.java @@ -23,6 +23,8 @@ import android.widget.Toast; import org.thoughtcrime.securesms.crypto.IdentityKeyUtil; import org.thoughtcrime.securesms.recipients.Recipient; +import org.thoughtcrime.securesms.util.DynamicLanguage; +import org.thoughtcrime.securesms.util.DynamicTheme; import org.thoughtcrime.securesms.util.MemoryCleaner; import org.whispersystems.textsecure.crypto.IdentityKey; import org.whispersystems.textsecure.crypto.MasterSecret; @@ -37,7 +39,7 @@ import org.whispersystems.textsecure.storage.Session; */ public class VerifyIdentityActivity extends KeyScanningActivity { - private Recipient recipient; + private Recipient recipient; private MasterSecret masterSecret; private TextView localIdentityFingerprint; @@ -45,8 +47,13 @@ public class VerifyIdentityActivity extends KeyScanningActivity { private int keyType; + private final DynamicTheme dynamicTheme = new DynamicTheme (); + private final DynamicLanguage dynamicLanguage = new DynamicLanguage(); + @Override public void onCreate(Bundle state) { + dynamicTheme.onCreate(this); + dynamicLanguage.onCreate(this); super.onCreate(state); getSupportActionBar().setDisplayHomeAsUpEnabled(true); setContentView(R.layout.verify_identity_activity); @@ -55,6 +62,15 @@ public class VerifyIdentityActivity extends KeyScanningActivity { initializeFingerprints(); } + @Override + public void onResume() { + super.onResume(); + dynamicTheme.onResume(this); + dynamicLanguage.onResume(this); + getSupportActionBar().setTitle(R.string.AndroidManifest__verify_identity); + + } + @Override protected void onDestroy() { MemoryCleaner.clean(masterSecret);