Back to project page mobiweaver-sconnect-android.
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.
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); } }