|
|
@ -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;
|
|
|
|