email: Add an ActionBar to the mail app's PreferenceActivity
Change-Id: Id2ed98d2c2cd6648e179fb2942f3bc4479049cd0 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
This commit is contained in:
parent
296d358d37
commit
e3c39f0e6d
@ -67,6 +67,7 @@ import com.android.mail.preferences.notifications.FolderNotificationLightPrefere
|
|||||||
import com.android.mail.providers.Folder;
|
import com.android.mail.providers.Folder;
|
||||||
import com.android.mail.providers.UIProvider;
|
import com.android.mail.providers.UIProvider;
|
||||||
import com.android.mail.ui.MailAsyncTaskLoader;
|
import com.android.mail.ui.MailAsyncTaskLoader;
|
||||||
|
import com.android.mail.ui.settings.BasePreferenceActivity;
|
||||||
import com.android.mail.utils.LogUtils;
|
import com.android.mail.utils.LogUtils;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
|
|
||||||
@ -89,7 +90,7 @@ import java.util.Map;
|
|||||||
* sync window may result in removal of messages. Instead, we only save to the database in {@link
|
* sync window may result in removal of messages. Instead, we only save to the database in {@link
|
||||||
* #onDestroy()}, unless it's called for configuration changes.
|
* #onDestroy()}, unless it's called for configuration changes.
|
||||||
*/
|
*/
|
||||||
public class MailboxSettings extends PreferenceActivity {
|
public class MailboxSettings extends BasePreferenceActivity {
|
||||||
public static final String PREFERENCE_SYNC_SETTINGS = "account_sync_settings";
|
public static final String PREFERENCE_SYNC_SETTINGS = "account_sync_settings";
|
||||||
public static final String PREFERENCE_PER_FOLDER_NOTIFICATIONS =
|
public static final String PREFERENCE_PER_FOLDER_NOTIFICATIONS =
|
||||||
"account_per_folder_notifications";
|
"account_per_folder_notifications";
|
||||||
@ -134,10 +135,6 @@ public class MailboxSettings extends PreferenceActivity {
|
|||||||
// Always show "app up" as we expect our parent to be an Email activity.
|
// Always show "app up" as we expect our parent to be an Email activity.
|
||||||
ActionBar actionBar = getActionBar();
|
ActionBar actionBar = getActionBar();
|
||||||
if (actionBar != null) {
|
if (actionBar != null) {
|
||||||
actionBar.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP, ActionBar.DISPLAY_HOME_AS_UP);
|
|
||||||
// Hide the app icon.
|
|
||||||
actionBar.setIcon(android.R.color.transparent);
|
|
||||||
actionBar.setDisplayUseLogoEnabled(false);
|
|
||||||
if (mType != null && mType.equals(PREFERENCE_SYNC_SETTINGS)) {
|
if (mType != null && mType.equals(PREFERENCE_SYNC_SETTINGS)) {
|
||||||
actionBar.setTitle(getString(R.string.mailbox_settings_activity_title));
|
actionBar.setTitle(getString(R.string.mailbox_settings_activity_title));
|
||||||
} else if (mType != null && mType.equals(PREFERENCE_PER_FOLDER_NOTIFICATIONS)) {
|
} else if (mType != null && mType.equals(PREFERENCE_PER_FOLDER_NOTIFICATIONS)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user