Skip to content

Commit aae2d47

Browse files
John HsingJohn Hsing
authored andcommitted
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>
1 parent 6cbf71d commit aae2d47

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@
127127
android:name=".ui.AlarmAlertActivity"
128128
android:label="@string/app_name"
129129
android:launchMode="singleInstance"
130-
android:theme="@android:style/Theme.Wallpaper.NoTitleBar" >
130+
android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" >
131131
</activity>
132132

133133
<activity
134134
android:name="net.micode.notes.ui.NotesPreferenceActivity"
135135
android:label="@string/preferences_title"
136136
android:launchMode="singleTop"
137-
android:theme="@android:style/Theme.Light" >
137+
android:theme="@android:style/Theme.Holo.Light" >
138138
</activity>
139139

140140
<service

src/net/micode/notes/ui/NotesPreferenceActivity.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import android.accounts.Account;
2020
import android.accounts.AccountManager;
21+
import android.app.ActionBar;
2122
import android.app.AlertDialog;
2223
import android.content.BroadcastReceiver;
2324
import android.content.ContentValues;
@@ -34,6 +35,7 @@
3435
import android.text.TextUtils;
3536
import android.text.format.DateFormat;
3637
import android.view.LayoutInflater;
38+
import android.view.Menu;
3739
import android.view.MenuItem;
3840
import android.view.View;
3941
import android.widget.Button;
@@ -70,6 +72,10 @@ public class NotesPreferenceActivity extends PreferenceActivity {
7072
@Override
7173
protected void onCreate(Bundle icicle) {
7274
super.onCreate(icicle);
75+
76+
/* using the app icon for navigation */
77+
getActionBar().setDisplayHomeAsUpEnabled(true);
78+
7379
addPreferencesFromResource(R.xml.preferences);
7480
mAccountCategory = (PreferenceCategory) findPreference(PREFERENCE_SYNC_ACCOUNT_KEY);
7581
mReceiver = new GTaskReceiver();
@@ -371,7 +377,9 @@ public void onReceive(Context context, Intent intent) {
371377
public boolean onOptionsItemSelected(MenuItem item) {
372378
switch (item.getItemId()) {
373379
case android.R.id.home:
374-
finish();
380+
Intent intent = new Intent(this, NotesListActivity.class);
381+
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
382+
startActivity(intent);
375383
return true;
376384
default:
377385
return false;

0 commit comments

Comments
 (0)