List of usage examples for android.text InputType TYPE_CLASS_TEXT
int TYPE_CLASS_TEXT
To view the source code for android.text InputType TYPE_CLASS_TEXT.
Click Source Link
From source file:com.liato.bankdroid.banking.banks.EspressoHouse.java
public EspressoHouse(Context context) { super(context); TAG = "EspressoHouse"; NAME = "Espresso House"; NAME_SHORT = "espressohouse"; BANKTYPE_ID = IBankTypes.ESPRESSOHOUSE; INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS; INPUT_TITLETEXT_USERNAME = R.string.email; }
From source file:org.totschnig.myexpenses.dialog.EditTextDialog.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Bundle args = getArguments();/*from www.j av a 2 s.co m*/ mEditText = new EditText(getActivity()); getDialog().setTitle(args.getString("dialogTitle")); // Show soft keyboard automatically mEditText.setInputType(InputType.TYPE_CLASS_TEXT); mEditText.setImeOptions(EditorInfo.IME_ACTION_DONE); mEditText.requestFocus(); getDialog().getWindow().setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_VISIBLE); mEditText.setOnEditorActionListener(this); mEditText.setId(1); mEditText.setText(args.getString("value")); //input.setSingleLine(); return mEditText; }
From source file:com.github.andrewlord1990.materialandroid.component.textfield.AbstractPasswordEditTextAssert.java
public AbstractPasswordEditTextAssert hasHiddenPassword() { isNotNull();/*from w w w.j a v a2 s. c om*/ assertThat(actual).overridingErrorMessage("Expected password hidden but was visible.") .hasInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); Assertions.assertThat(actual.isPasswordVisible()).isFalse(); return myself; }
From source file:de.uni.stuttgart.informatik.ToureNPlaner.UI.Dialogs.TextDialog.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { input = new EditText(getActivity()); String message = getArguments().getString("title"); CharSequence content;//from w ww. j av a 2 s.c o m if (savedInstanceState == null) { content = getArguments().getCharSequence("content"); } else { content = savedInstanceState.getCharSequence("content"); } input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI); input.setText(content, TextView.BufferType.SPANNABLE); return new AlertDialog.Builder(getActivity()).setTitle(message).setView(input) .setPositiveButton(getResources().getText(android.R.string.ok), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { doPositiveClick(); } }) .setNegativeButton(getResources().getText(android.R.string.cancel), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { doNegativeClick(); } }) .setOnKeyListener(new DialogInterface.OnKeyListener() { @Override public boolean onKey(DialogInterface dialogInterface, int i, KeyEvent keyEvent) { if ((keyEvent.getAction() == KeyEvent.ACTION_DOWN) && (i == KeyEvent.KEYCODE_ENTER)) { dialogInterface.dismiss(); doPositiveClick(); return true; } return false; } }).create(); }
From source file:rikka.materialpreference.EditTextPreference.java
public EditTextPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); TypedArray a;/* w ww.j a va2s.c om*/ a = context.obtainStyledAttributes(attrs, R.styleable.EditTextPreference); mInputType = TypedArrayUtils.getInt(a, R.styleable.EditTextPreference_inputType, R.styleable.EditTextPreference_android_inputType, InputType.TYPE_CLASS_TEXT); mSingleLine = TypedArrayUtils.getBoolean(a, R.styleable.EditTextPreference_singleLine, R.styleable.EditTextPreference_android_singleLine, true); mSelectAllOnFocus = TypedArrayUtils.getBoolean(a, R.styleable.EditTextPreference_selectAllOnFocus, R.styleable.EditTextPreference_android_selectAllOnFocus, false); mCommitOnEnter = a.getBoolean(R.styleable.EditTextPreference_commitOnEnter, false); a.recycle(); /* Retrieve the Preference summary attribute since it's private * in the Preference class. */ a = context.obtainStyledAttributes(attrs, R.styleable.Preference, defStyleAttr, defStyleRes); mSummary = TypedArrayUtils.getString(a, R.styleable.Preference_summary, R.styleable.Preference_android_summary); a.recycle(); }
From source file:com.mario22gmail.license.nfc_project.FragmentAddWebCredentials.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_add_web_credentials, container, false); final EditText urlEditText = (EditText) view.findViewById(R.id.fragmentAddWebUrlTextBox); urlEditText.setText(defaultUrl);/*from w w w. ja v a2s. c o m*/ urlEditText.setSingleLine(); // EditTextFocusChangeListner textLisnerWebEditText = new EditTextFocusChangeListner(getContext(),R.id.fragmentAddWebUrlTextBox); // urlEditText.setOnFocusChangeListener(textLisnerWebEditText); final EditText userNameEditText = (EditText) view.findViewById(R.id.fragmentAddUserNameTextBox); userNameEditText.setSingleLine(); // EditTextFocusChangeListner textLisnerUserEdit = new EditTextFocusChangeListner(getContext(), R.id.fragmentAddUserNameTextBox); // userNameEditText.setOnFocusChangeListener(textLisnerUserEdit); final EditText passwordEditText = (EditText) view.findViewById(R.id.fragmentAddWebPasswordTextBox); // passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance()); passwordEditText.setSingleLine(); passwordEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); EditTextFocusChangeListner textLisnerPasswordEdit = new EditTextFocusChangeListner(getContext(), R.id.fragmentAddWebPasswordTextBox); passwordEditText.setOnFocusChangeListener(textLisnerPasswordEdit); if (!defaultUrl.equals("")) { urlEditText.setVisibility(View.GONE); } if (!userNameString.equals("")) { userNameEditText.setText(userNameString, TextView.BufferType.EDITABLE); Button writeButton = (Button) view.findViewById(R.id.buttonWriteCredentials); writeButton.setText("Modifica"); writeButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // Perform action on click WebsitesCredentials credentials = new WebsitesCredentials(); credentials.setUserName(userNameEditText.getText().toString()); credentials.setUrl(urlEditText.getText().toString()); credentials.setPassword(passwordEditText.getText().toString()); Intent editIntent = new Intent("editWebCredentialConfirmation"); editIntent.putExtra("credential", credentials); NavigationDrawerActivity.getAppContext().sendBroadcast(editIntent); } }); } return view; }
From source file:com.savvywits.wethepeople.MainActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mReceiver = new RESTReceiver(new Handler()); mReceiver.setReceiver(this); mData = (EditText) findViewById(R.id.zipcode); // This makes a nice ten-key pad mData.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_CLASS_NUMBER); Button submitButton = (Button) findViewById(R.id.submit); submitButton.setOnClickListener(this); }
From source file:com.liato.bankdroid.banking.banks.Hors.java
public Hors(Context context) { super(context); super.TAG = TAG; super.NAME = NAME; super.NAME_SHORT = NAME_SHORT; super.BANKTYPE_ID = BANKTYPE_ID; super.URL = URL; super.DISPLAY_DECIMALS = DISPLAY_DECIMALS; super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS; super.INPUT_HINT_USERNAME = context.getString(R.string.card_id); super.INPUT_HIDDEN_PASSWORD = true; }
From source file:com.mario22gmail.license.nfc_project.FragmentPinDialog.java
public void disableSoftInputFromAppearing(EditText editText) { if (Build.VERSION.SDK_INT >= 11) { editText.setRawInputType(InputType.TYPE_CLASS_TEXT); editText.setTextIsSelectable(true); } else {/*from www.j a v a2 s. com*/ editText.setRawInputType(InputType.TYPE_NULL); editText.setFocusable(true); } }
From source file:com.liato.bankdroid.banking.banks.Bioklubben.java
public Bioklubben(Context context) { super(context); super.TAG = TAG; super.NAME = NAME; super.NAME_SHORT = NAME_SHORT; super.BANKTYPE_ID = BANKTYPE_ID; super.URL = URL; super.DISPLAY_DECIMALS = DISPLAY_DECIMALS; super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS; super.INPUT_HINT_USERNAME = context.getString(R.string.email); currency = context.getString(R.string.points); }