Back to project page AndroidFortunes.
The source code is released under:
Apache License
If you think the Android project AndroidFortunes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.codechimp.androidfortunes; // w w w. j a v a 2 s . c om import android.os.Bundle; import android.preference.PreferenceActivity; import android.support.v4.app.NavUtils; import android.view.MenuItem; import java.util.List; public class SettingsActivity extends PreferenceActivity { @Override protected boolean isValidFragment(String fragmentName) { return GeneralUserPreferencesFragment.class.getName().equals(fragmentName); } @Override protected void onStop() { super.onStop(); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getActionBar().setHomeButtonEnabled(true); getActionBar().setDisplayHomeAsUpEnabled(true); } @Override public void onBuildHeaders(List<Header> target) { loadHeadersFromResource(R.xml.preference_headers, target); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: // app icon in action bar clicked; go home NavUtils.navigateUpFromSameTask(this); return true; default: return super.onOptionsItemSelected(item); } } }