1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-21 16:35:09 -05:00

SettingsActivity: Add up navigation.

This commit is contained in:
Sebastian Kaspari 2012-07-28 16:22:49 +02:00
parent da78ea15d0
commit 56304633f4

View File

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