mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
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:
@@ -23,6 +23,7 @@ import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
import org.thoughtcrime.securesms.recipients.Recipients;
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme;
|
||||
|
||||
import com.actionbarsherlock.app.ActionBar;
|
||||
import com.actionbarsherlock.app.ActionBar.Tab;
|
||||
@@ -41,6 +42,8 @@ import com.actionbarsherlock.view.MenuItem;
|
||||
*/
|
||||
public class ContactSelectionActivity extends PassphraseRequiredSherlockFragmentActivity {
|
||||
|
||||
private final DynamicTheme dynamicTheme = new DynamicTheme();
|
||||
|
||||
private ContactSelectionListFragment contactsFragment;
|
||||
private ContactSelectionGroupsFragment groupsFragment;
|
||||
private ContactSelectionRecentFragment recentFragment;
|
||||
@@ -49,6 +52,7 @@ public class ContactSelectionActivity extends PassphraseRequiredSherlockFragment
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle icicle) {
|
||||
dynamicTheme.onCreate(this);
|
||||
super.onCreate(icicle);
|
||||
|
||||
ActionBar actionBar = this.getSupportActionBar();
|
||||
@@ -62,6 +66,12 @@ public class ContactSelectionActivity extends PassphraseRequiredSherlockFragment
|
||||
setupRecentTab();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
dynamicTheme.onResume(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater = this.getSupportMenuInflater();
|
||||
|
||||
Reference in New Issue
Block a user