Back to project page ShareManager.
The source code is released under:
Copyright (c) 2013, Nelspike All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Red...
If you think the Android project ShareManager 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 share.manager.stock; // w w w. j a va 2 s .co m import android.os.Build; import android.os.Bundle; import android.preference.PreferenceActivity; import android.preference.PreferenceFragment; import android.support.v4.app.NavUtils; import android.view.MenuItem; public class SettingsActivity extends PreferenceActivity { private PreferencesFragment prefFrag; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); prefFrag = new PreferencesFragment(); getFragmentManager().beginTransaction() .replace(android.R.id.content, prefFrag).commit(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) getActionBar() .setDisplayHomeAsUpEnabled(true); } public static class PreferencesFragment extends PreferenceFragment { @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences); } } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: NavUtils.navigateUpFromSameTask(this); return true; default: return super.onOptionsItemSelected(item); } } }