added action bar home button to settings...made toggle fullscreen an method of main activity
This commit is contained in:
@ -7,6 +7,7 @@ import java.util.Scanner;
|
||||
import android.app.Activity;
|
||||
import android.content.res.AssetManager;
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
|
||||
public class IITC_Settings extends Activity {
|
||||
|
||||
@ -25,6 +26,10 @@ public class IITC_Settings extends Activity {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// set action bar title
|
||||
this.getActionBar().setTitle("IITC Mobile Settings");
|
||||
this.getActionBar().setHomeButtonEnabled(true);
|
||||
|
||||
ArrayList<String> asset_list = new ArrayList<String>();
|
||||
ArrayList<String> asset_values = new ArrayList<String>();
|
||||
|
||||
@ -70,4 +75,16 @@ public class IITC_Settings extends Activity {
|
||||
getFragmentManager().beginTransaction()
|
||||
.replace(android.R.id.content, settings).commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
// exit settings when home button (iitc icon) is pressed
|
||||
case android.R.id.home :
|
||||
this.finish();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user