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.github.andrewlord1990.materialandroid.component.textfield.AbstractPasswordEditTextAssert.java
public AbstractPasswordEditTextAssert hasVisiblePassword() { isNotNull();/*from w w w . ja v a2 s .c om*/ assertThat(actual).overridingErrorMessage("Expected password visible but was hidden.") .hasInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); Assertions.assertThat(actual.isPasswordVisible()).isTrue(); return myself; }
From source file:com.csipsimple.wizards.impl.Ippi.java
@Override public void fillLayout(final SipProfile account) { super.fillLayout(account); accountUsername.getEditText().setInputType(InputType.TYPE_CLASS_TEXT); //Get wizard specific row customWizardText = (TextView) parent.findViewById(R.id.custom_wizard_text); customWizard = (LinearLayout) parent.findViewById(R.id.custom_wizard_row); settingsContainer = (ViewGroup) parent.findViewById(R.id.settings_container); validationBar = (ViewGroup) parent.findViewById(R.id.validation_bar); updateAccountInfos(account);/*from ww w . j a v a 2s .c o m*/ extAccCreator = new AccountCreationWebview(parent, "https://m.ippi.fr/subscribe/android.php", this); }
From source file:com.cerema.cloud2.ui.dialog.CredentialsDialogFragment.java
@Override public Dialog onCreateDialog(Bundle savedInstanceState) { // Create field for username mUsernameET = new EditText(getActivity()); mUsernameET.setHint(getActivity().getText(R.string.auth_username)); // Create field for password mPasswordET = new EditText(getActivity()); mPasswordET.setHint(getActivity().getText(R.string.auth_password)); mPasswordET.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); // Prepare LinearLayout for dialog LinearLayout ll = new LinearLayout(getActivity()); ll.setOrientation(LinearLayout.VERTICAL); ll.addView(mUsernameET);/*www . jav a 2s .co m*/ ll.addView(mPasswordET); ll.requestFocus(); setRetainInstance(true); Builder authDialog = new AlertDialog.Builder(getActivity()) .setTitle(getActivity().getText(R.string.saml_authentication_required_text)).setView(ll) .setCancelable(false).setPositiveButton(R.string.common_ok, this) .setNegativeButton(R.string.common_cancel, this); Dialog d = authDialog.create(); d.getWindow().setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_VISIBLE); return d; }
From source file:com.csipsimple.wizards.impl.Zadarma.java
/** * {@inheritDoc}/*from w w w . j av a2s .c o m*/ */ @Override public void fillLayout(final SipProfile account) { super.fillLayout(account); accountUsername.getEditText().setInputType(InputType.TYPE_CLASS_TEXT); // Get wizard specific row customWizardText = (TextView) parent.findViewById(R.id.custom_wizard_text); customWizard = (LinearLayout) parent.findViewById(R.id.custom_wizard_row); settingsContainer = (ViewGroup) parent.findViewById(R.id.settings_container); validationBar = (ViewGroup) parent.findViewById(R.id.validation_bar); updateAccountInfos(account); extAccCreator = new AccountCreationWebview(parent, webCreationPage, this); }
From source file:com.hichinaschool.flashcards.preferences.StepsPreference.java
/** * Update settings to show a numeric keyboard instead of the default keyboard. * <p>/*from ww w .ja v a2 s .co m*/ * This method should only be called once from the constructor. */ private void updateSettings() { // Use the number pad but still allow normal text for spaces and decimals. getEditText().setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_CLASS_TEXT); }
From source file:de.nico.asura.activities.AuthWebView1.java
private void checkLogin() { // Layout for Dialog LinearLayout layout = new LinearLayout(this); layout.setOrientation(LinearLayout.VERTICAL); final EditText edit_name = new EditText(this); edit_name.setHint(getString(R.string.menu_AuthWeb_1_fiFi)); layout.addView(edit_name);/*w ww .jav a 2 s .com*/ final EditText edit_pass = new EditText(this); edit_pass.setHint(getString(R.string.menu_AuthWeb_1_seFi)); edit_pass.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); layout.addView(edit_pass); Builder builder = new Builder(this); builder.setTitle(getString(R.string.menu_AuthWeb_1_name)).setCancelable(false).setView(layout) .setPositiveButton(getString(android.R.string.ok), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int whichButton) { firstField = edit_name.getText().toString(); secondField = edit_pass.getText().toString(); // Nothing? if (firstField.length() == 0 || secondField.length() == 0) { Utils.makeShortToast(AuthWebView1.this, getString(R.string.wrong)); checkLogin(); return; } Editor editor = prefs.edit(); editor.putString("firstFirst", firstField); editor.putString("firstSecond", secondField); editor.commit(); openWebView(); } }).setNegativeButton(getString(android.R.string.cancel), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int whichButton) { AuthWebView1.this.finish(); } }).show(); }
From source file:nya.miku.wishmaster.chans.nullchan.NullchanoneModule.java
private void addDomainPreference(PreferenceGroup group) { Context context = group.getContext(); EditTextPreference domainPref = new EditTextPreference(context); domainPref.setTitle(R.string.pref_domain); domainPref.setDialogTitle(R.string.pref_domain); domainPref.setKey(getSharedKey(PREF_KEY_DOMAIN)); domainPref.getEditText().setHint(CHAN_DOMAIN); domainPref.getEditText().setSingleLine(); domainPref.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI); group.addPreference(domainPref);/*from ww w. j a v a2 s. com*/ }
From source file:org.cvasilak.jboss.mobile.app.fragments.DeploymentDetailsDialogFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.deploymentdetail_form, container, false); key = (EditText) view.findViewById(R.id.key); key.setText(BYTES_VALUE);//from w w w . j a v a 2 s . c om key.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS); name = (EditText) view.findViewById(R.id.name); name.setText(NAME); name.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS); runtimeName = (EditText) view.findViewById(R.id.runtimeName); runtimeName.setText(NAME); runtimeName.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS); Button save = (Button) view.findViewById(R.id.done); save.setOnClickListener(onSave); return view; }
From source file:com.tinbytes.simplelistviewapp.SimpleListViewActivity.java
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); switch (id) { case R.id.action_add_animal: final EditText input = new EditText(this); input.setInputType(InputType.TYPE_CLASS_TEXT); new AlertDialog.Builder(this).setTitle("New Animal").setView(input) .setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override//w w w .j a va2 s . c om public void onClick(DialogInterface dialog, int which) { ContentValues cv = new ContentValues(); cv.put(DatabaseContract.AnimalColumns.NAME, input.getText().toString()); cv.put(DatabaseContract.AnimalColumns.CATEGORY, "Unknown"); Uri uri = getContentResolver().insert(DatabaseContract.AnimalTable.CONTENT_URI, cv); if (uri != null) { getContentResolver().notifyChange(uri, null); } } }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }).show(); return true; } return super.onOptionsItemSelected(item); }
From source file:ca.uqac.florentinth.speakerauthentication.CreateActivity.java
private void initGUI() { view = findViewById(R.id.create_layout); usernameInput = (EditText) findViewById(R.id.username_input); passwordInput = (EditText) findViewById(R.id.password_input); visibilityImage = (ImageView) findViewById(R.id.visibility); femaleRadio = (RadioButton) findViewById(R.id.radio_female); maleRadio = (RadioButton) findViewById(R.id.radio_male); createBtn = (Button) findViewById(R.id.btn_create); usernameInput.setText("user" + StringUtils.getCurrentDateTime()); visibilityImage.setOnTouchListener(new View.OnTouchListener() { @Override//from w ww .j av a2s . c o m public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { passwordInput.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); } else { if (event.getAction() == MotionEvent.ACTION_UP) { passwordInput .setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); } } return true; } }); createBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { submit(); } }); }