Android Open Source - TATupload Option Activity






From Project

Back to project page TATupload.

License

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.

Java Source Code

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

}




Java Source Code List

org.apache.pig.impl.util.ObjectSerializer.java
uk.org.sucu.tatupload.BrowserAccessor.java
uk.org.sucu.tatupload.MessageArrayAdapter.java
uk.org.sucu.tatupload.NetCaller.java
uk.org.sucu.tatupload.Notifications.java
uk.org.sucu.tatupload.ParameterArrayAdapter.java
uk.org.sucu.tatupload.ResolveInfoArrayAdapter.java
uk.org.sucu.tatupload.Settings.java
uk.org.sucu.tatupload.TabContent.java
uk.org.sucu.tatupload.TabManager.java
uk.org.sucu.tatupload.TatUploadApplication.java
uk.org.sucu.tatupload.activity.MainActivity.java
uk.org.sucu.tatupload.activity.OptionActivity.java
uk.org.sucu.tatupload.activity.ParameterViewActivity.java
uk.org.sucu.tatupload.activity.SmsReviewActivity.java
uk.org.sucu.tatupload.activity.TutorialActivity.java
uk.org.sucu.tatupload.message.SmsList.java
uk.org.sucu.tatupload.message.SmsReceiver.java
uk.org.sucu.tatupload.message.Text.java
uk.org.sucu.tatupload.parse.Parameters.java
uk.org.sucu.tatupload.parse.Parser.java
uk.org.sucu.tatupload.parse.Property.java