Use the app icon for navigation in settings_page

In addition, set theme of settings_page and alarm_page to
Theme.Holo.Light.

Signed-off-by: John Hsing <tsyj2007@gmail.com>
master
John Hsing 13 years ago committed by John Hsing
parent 6cbf71d77e
commit aae2d47a75

@ -127,14 +127,14 @@
android:name=".ui.AlarmAlertActivity" android:name=".ui.AlarmAlertActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:launchMode="singleInstance" android:launchMode="singleInstance"
android:theme="@android:style/Theme.Wallpaper.NoTitleBar" > android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" >
</activity> </activity>
<activity <activity
android:name="net.micode.notes.ui.NotesPreferenceActivity" android:name="net.micode.notes.ui.NotesPreferenceActivity"
android:label="@string/preferences_title" android:label="@string/preferences_title"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@android:style/Theme.Light" > android:theme="@android:style/Theme.Holo.Light" >
</activity> </activity>
<service <service

@ -18,6 +18,7 @@ package net.micode.notes.ui;
import android.accounts.Account; import android.accounts.Account;
import android.accounts.AccountManager; import android.accounts.AccountManager;
import android.app.ActionBar;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.ContentValues; import android.content.ContentValues;
@ -34,6 +35,7 @@ import android.preference.PreferenceCategory;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.format.DateFormat; import android.text.format.DateFormat;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
@ -70,6 +72,10 @@ public class NotesPreferenceActivity extends PreferenceActivity {
@Override @Override
protected void onCreate(Bundle icicle) { protected void onCreate(Bundle icicle) {
super.onCreate(icicle); super.onCreate(icicle);
/* using the app icon for navigation */
getActionBar().setDisplayHomeAsUpEnabled(true);
addPreferencesFromResource(R.xml.preferences); addPreferencesFromResource(R.xml.preferences);
mAccountCategory = (PreferenceCategory) findPreference(PREFERENCE_SYNC_ACCOUNT_KEY); mAccountCategory = (PreferenceCategory) findPreference(PREFERENCE_SYNC_ACCOUNT_KEY);
mReceiver = new GTaskReceiver(); mReceiver = new GTaskReceiver();
@ -371,7 +377,9 @@ public class NotesPreferenceActivity extends PreferenceActivity {
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) { switch (item.getItemId()) {
case android.R.id.home: case android.R.id.home:
finish(); Intent intent = new Intent(this, NotesListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
return true; return true;
default: default:
return false; return false;

Loading…
Cancel
Save