Android Open Source - mobiweaver-sconnect-android App Preferences Activity






From Project

Back to project page mobiweaver-sconnect-android.

License

The source code is released under:

Apache License

If you think the Android project mobiweaver-sconnect-android 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.cognitiva.sconnect;
/*from w w w  .  j a v  a  2 s.  co m*/
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.PreferenceActivity;
import android.text.InputType;

public class AppPreferencesActivity extends PreferenceActivity {
  
  @Override 
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.preferences);
    //restrict some preferences to numeric values 
    EditTextPreference pref = (EditTextPreference)findPreference("port");
    pref.getEditText().setInputType(InputType.TYPE_CLASS_NUMBER);
    pref = (EditTextPreference)findPreference("client");
    pref.getEditText().setInputType(InputType.TYPE_CLASS_NUMBER);
  }
}




Java Source Code List

com.cognitiva.sconnect.AppPreferencesActivity.java
com.cognitiva.sconnect.SConnectActivity.java
com.phonegap.plugins.barcodescanner.BarcodeScanner.java