access settings from githandler activity
This commit is contained in:
parent
265ac86903
commit
1e3a2a8ae7
1 changed files with 11 additions and 2 deletions
|
@ -5,6 +5,7 @@ import android.app.AlertDialog;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -189,7 +190,15 @@ public class GitHandler extends Activity {
|
||||||
// automatically handle clicks on the Home/Up button, so long
|
// automatically handle clicks on the Home/Up button, so long
|
||||||
// as you specify a parent activity in AndroidManifest.xml.
|
// as you specify a parent activity in AndroidManifest.xml.
|
||||||
int id = item.getItemId();
|
int id = item.getItemId();
|
||||||
if (id == R.id.action_settings) {
|
switch (id) {
|
||||||
|
case R.id.user_pref:
|
||||||
|
try {
|
||||||
|
Intent intent = new Intent(this, UserPreference.class);
|
||||||
|
startActivity(intent);
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("Exception caught :(");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue