Back to project page TATupload.
The source code is released under:
GNU General Public License
If you think the Android project TATupload 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 uk.org.sucu.tatupload.activity; //from w ww . j a v a 2s . c o m import uk.org.sucu.tatupload.BrowserAccessor; import uk.org.sucu.tatupload.Notifications; import uk.org.sucu.tatupload.R; import android.os.Bundle; import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceActivity; @SuppressWarnings("deprecation") //it uses methods replaced within new PreferenceFragments in honeycomb public class OptionActivity extends PreferenceActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences); } public void onStart(){ super.onStart(); Preference restore = findPreference(getString(R.string.browser)); restore.setOnPreferenceClickListener(new OnPreferenceClickListener(){ @Override public boolean onPreferenceClick(Preference arg0) { BrowserAccessor.openBrowserChoicePopup(OptionActivity.this, true); return true; } }); Preference notify = findPreference(getString(R.string.show_notification_key)); notify.setOnPreferenceChangeListener(new OnPreferenceChangeListener(){ @Override public boolean onPreferenceChange(Preference preference, Object newValue) { Boolean processing = (Boolean) newValue; if(processing){ Notifications.displayNotification(OptionActivity.this); } else { Notifications.hideNotification(OptionActivity.this); } return true; } }); } }