If you think the Android project DashNotifier listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.umang.dashnotifier;
/*fromwww.java2s.com*/import android.app.FragmentManager;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.MenuItem;
publicclass DashNotifierSettingsActivity2 extends AbstractSettings {
final String ext = "2";
PrefsFragment mPrefsFragment;
SharedPreferences preferences;
SharedPreferences.Editor editor;
protectedvoid onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActionBar().setDisplayHomeAsUpEnabled(true);
preferences = PreferenceManager.getDefaultSharedPreferences(this);
editor = preferences.edit();
// Display the fragment as the main content.
FragmentManager mFragmentManager = getFragmentManager();
mPrefsFragment = new PrefsFragment(ext);
mFragmentManager.beginTransaction().replace(android.R.id.content, mPrefsFragment,"pref").commit();
}
@Override
publicboolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
// Respond to the action bar's Up/Home button
case android.R.id.home:
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
protectedvoid onActivityResult(int requestCode, int resultCode, Intent imageReturnedIntent) {
Commons.saveFileSetPreference(requestCode, resultCode,
imageReturnedIntent, this, ext, editor);
}
}