Skip to content

Commit

Permalink
SettingsActivity: Add up navigation.
Browse files Browse the repository at this point in the history
  • Loading branch information
pocmo committed Jul 28, 2012
1 parent da78ea1 commit 5630463
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions application/src/org/yaaic/activity/SettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

import android.os.Bundle;

import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockPreferenceActivity;
import com.actionbarsherlock.view.MenuItem;

/**
* Settings
Expand All @@ -41,6 +43,22 @@ public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);

ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);

addPreferencesFromResource(R.xml.preferences);
}

/**
* On menu item selected.
*/
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item)
{
if (item.getItemId() == android.R.id.home) {
finish();
}

return true;
}
}

0 comments on commit 5630463

Please sign in to comment.