List of usage examples for android.text InputType TYPE_CLASS_PHONE
int TYPE_CLASS_PHONE
To view the source code for android.text InputType TYPE_CLASS_PHONE.
Click Source Link
From source file:Main.java
/** Returns true if number keyboard is preferred by EditorInfo.inputType. */ public static boolean isNumberKeyboardPreferred(int inputType) { int typeClass = inputType & InputType.TYPE_MASK_CLASS; // As of API Level 21, following condition equals to "typeClass != InputType.TYPE_CLASS_TEXT". // However type-class might be added in future so safer expression is employed here. return typeClass == InputType.TYPE_CLASS_DATETIME || typeClass == InputType.TYPE_CLASS_NUMBER || typeClass == InputType.TYPE_CLASS_PHONE; }
From source file:com.liato.bankdroid.banking.banks.MinPension.java
public MinPension(Context context) { super(context); TAG = "MinPension"; NAME = "Min Pension.se"; NAME_SHORT = "minpension"; BANKTYPE_ID = IBankTypes.MINPENSION; INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE; INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE | InputType.TYPE_TEXT_VARIATION_PASSWORD; ;//from w w w.j a va 2s.c o m INPUT_HINT_USERNAME = res.getText(R.string.pno).toString(); }
From source file:com.csipsimple.wizards.impl.BgCall.java
@Override public void fillLayout(final SipProfile account) { super.fillLayout(account); accountUsername.getEditText().setInputType(InputType.TYPE_CLASS_PHONE); //Get wizard specific row customWizardText = (TextView) parent.findViewById(R.id.custom_wizard_text); customWizard = (LinearLayout) parent.findViewById(R.id.custom_wizard_row); updateAccountInfos(account);//w ww.j av a 2 s . c o m }
From source file:gov.in.bloomington.georeporter.fragments.PersonalInfoFragment.java
@Override public void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); final String fieldname = PersonalInfoAdapter.FIELDS[position]; final TextView label = (TextView) v.findViewById(android.R.id.text1); final TextView input = (TextView) v.findViewById(android.R.id.text2); final EditText newValue = new EditText(getActivity()); newValue.setText(input.getText());/*from w w w. j ava 2 s.c o m*/ int type = InputType.TYPE_TEXT_FLAG_CAP_WORDS; if (fieldname == "email") { type = InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS; } if (fieldname == "phone") { type = InputType.TYPE_CLASS_PHONE; } newValue.setInputType(type); new AlertDialog.Builder(getActivity()).setTitle(label.getText()).setView(newValue) .setPositiveButton("Ok", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { try { mPersonalInfo.put(fieldname, newValue.getText()); } catch (JSONException e) { // Just ignore any errors } } }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // Do Nothing } }).show(); }
From source file:com.liato.bankdroid.banking.banks.Jojo.java
public Jojo(Context context) { super(context); super.TAG = TAG; super.NAME = NAME; super.NAME_SHORT = NAME_SHORT; super.BANKTYPE_ID = BANKTYPE_ID; super.URL = URL; super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE; super.INPUT_TITLETEXT_USERNAME = R.string.card_number; super.INPUT_TITLETEXT_PASSWORD = R.string.cvc; }
From source file:com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen.java
public Rikslunchen(Context context) { super(context); super.TAG = TAG; super.NAME = NAME; super.NAME_SHORT = NAME_SHORT; super.BANKTYPE_ID = BANKTYPE_ID; super.URL = URL; super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE; super.INPUT_TITLETEXT_USERNAME = R.string.card_id; super.INPUT_HIDDEN_PASSWORD = true; }
From source file:com.csipsimple.wizards.impl.Mobex.java
/** * {@inheritDoc}/*from w w w.j av a 2s .co m*/ */ @Override public void fillLayout(SipProfile account) { super.fillLayout(account); accountUsername.getEditText().setInputType(InputType.TYPE_CLASS_PHONE); if (TextUtils.isEmpty(account.username)) { accountUsername.setText(USUAL_PREFIX); } //Get wizard specific row customWizardText = (TextView) parent.findViewById(R.id.custom_wizard_text); customWizard = (LinearLayout) parent.findViewById(R.id.custom_wizard_row); updateAccountInfos(account); }
From source file:com.github.chilinh.androidformbuilder.FormTestFragment.java
@Override protected Form createForm() { return new Form.Builder().addSection(new SectionElement("Personal")) .addElement(new EditTextElement(null, "Name:").placeholder("Your name here").required(true) .labelTypeface(Typeface.BOLD)) .addElement(new ComboBoxElement(null, "Genre", "", "Male", "Female")) .addElement(new TextElement(null, "For you:").placeholder("N/A").labelTypeface(Typeface.BOLD)) .addElement(new EditTextElement(null, null).placeholder("Phone number here") .setInputTypeMask(InputType.TYPE_CLASS_PHONE, true).required(true)) .addSection(new SectionElement("More")) .addElement(new DatePickerElement(null, "Birthday: ").date(Calendar.getInstance().getTime())) .addElement(new TimePickerElement(null, "Leave: ").time(Calendar.getInstance().getTime())) .build(getContext());//w w w . ja v a 2 s . com }
From source file:com.liato.bankdroid.banking.banks.ica.ICA.java
public ICA(Context context) { super(context); TAG = "ICA";/*from w w w.j a v a2 s . c o m*/ NAME = "ICA"; NAME_SHORT = "ica"; URL = "http://mobil.ica.se/"; BANKTYPE_ID = IBankTypes.ICA; INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE; INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE; INPUT_HINT_USERNAME = "MMDDXXXX"; mHeaders.put(AUTHENTICATION_TICKET_HEADER, null); mHeaders.put(SESSION_TICKET_HEADER, null); mHeaders.put(LOGOUT_KEY_HEADER, null); }