mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-22 00:42:16 -05:00
SettingsActivity: Add up navigation.
This commit is contained in:
parent
da78ea15d0
commit
56304633f4
@ -24,7 +24,9 @@ import org.yaaic.R;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.actionbarsherlock.app.ActionBar;
|
||||
import com.actionbarsherlock.app.SherlockPreferenceActivity;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
/**
|
||||
* Settings
|
||||
@ -41,6 +43,22 @@ public class SettingsActivity extends SherlockPreferenceActivity
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user