bc

TextInputLayout

book_age12+
3
FOLLOW
1K
READ
dark
drama
comedy
sweet
transgender
heavy
lighthearted
scary
asexual
Writing Academy
like
intro-logo
Blurb

setTitle("TextInputLayout");

textinputlayout1.removeView(edittext1);

final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this);

textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));

//textinput.setBoxBackgroundColor(0xFFFFFFFF);

textinput.setBoxStrokeColor(0xFF0D47A1);

textinput.setBoxCornerRadii(5, 5, 5, 5);

textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 );

textinput.setHintEnabled(true);

textinput.setHint("Email Address");

textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE);

textinput.setErrorEnabled(true);

textinput.setHintAnimationEnabled(true);

textinput.setHelperText("Type your email address");

textinput.setCounterEnabled(true);

textinput.setCounterMaxLength(15);

if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) {

textinput.setError("Reached the text max length");

} else {

textinput.setErrorEnabled(false);

}

textinput.addView(edittext1);

textinputlayout1.addView(textinput);

textinputlayout2.removeView(edittext2);

final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this);

textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));

//textinput2.setBoxBackgroundColor(0xFFFFFFFF);

textinput2.setBoxStrokeColor(0xFF0D47A1);

textinput2.setBoxCornerRadii(5, 5, 5, 5);

textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 );

textinput2.setHintEnabled(true);

textinput2.setHint("Password");

textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE);

textinput2.setErrorEnabled(true);

textinput2.setHintAnimationEnabled(true);

textinput2.setHelperText("Type your password");

textinput2.setCounterEnabled(true);

textinput2.setCounterMaxLength(15);

textinput2.setPasswordVisibilityToggleEnabled(true);

textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock);

if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) {

textinput2.setError("Reached the text max length");

} else {

textinput2.setErrorEnabled(false);

}

textinput2.addView(edittext2);

textinputlayout2.addView(textinput2);

chap-preview
Free preview
TextInputLayout
setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);setTitle("TextInputLayout"); textinputlayout1.removeView(edittext1); final com.google.android.material.textfield.TextInputLayout textinput = new com.google.android.material.textfield.TextInputLayout (this); textinput.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput.setBoxBackgroundColor(0xFFFFFFFF); textinput.setBoxStrokeColor(0xFF0D47A1); textinput.setBoxCornerRadii(5, 5, 5, 5); textinput.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput.setHintEnabled(true); textinput.setHint("Email Address"); textinput.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput.setErrorEnabled(true); textinput.setHintAnimationEnabled(true); textinput.setHelperText("Type your email address"); textinput.setCounterEnabled(true); textinput.setCounterMaxLength(15); if (edittext1.getText().toString().length() > textinput.getCounterMaxLength()) { textinput.setError("Reached the text max length"); } else { textinput.setErrorEnabled(false); } textinput.addView(edittext1); textinputlayout1.addView(textinput); textinputlayout2.removeView(edittext2); final com.google.android.material.textfield.TextInputLayout textinput2 = new com.google.android.material.textfield.TextInputLayout (this); textinput2.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); //textinput2.setBoxBackgroundColor(0xFFFFFFFF); textinput2.setBoxStrokeColor(0xFF0D47A1); textinput2.setBoxCornerRadii(5, 5, 5, 5); textinput2.setPadding((int)8, (int)0 , (int)0 , (int)0 ); textinput2.setHintEnabled(true); textinput2.setHint("Password"); textinput2.setBoxBackgroundMode(textinput.BOX_BACKGROUND_OUTLINE); textinput2.setErrorEnabled(true); textinput2.setHintAnimationEnabled(true); textinput2.setHelperText("Type your password"); textinput2.setCounterEnabled(true); textinput2.setCounterMaxLength(15); textinput2.setPasswordVisibilityToggleEnabled(true); textinput2.setPasswordVisibilityToggleDrawable(R.drawable.ic_lock); if (edittext2.getText().toString().length() > textinput2.getCounterMaxLength()) { textinput2.setError("Reached the text max length"); } else { textinput2.setErrorEnabled(false); } textinput2.addView(edittext2); textinputlayout2.addView(textinput2);

editor-pick
Dreame-Editor's pick

bc

Dominating the Dominatrix

read
52.5K
bc

The Luna He Rejected (Extended version)

read
550.1K
bc

Secretly Rejected My Alpha Mate

read
16.6K
bc

Beyond the Divine States

read
1K
bc

Taken: 96 Hours to Rescue Daughter

read
116.0K
bc

The Slave Mated To The Pack's Angel

read
378.2K
bc

Claimed by my Brother’s Best Friends

read
782.7K

Scan code to download app

download_iosApp Store
google icon
Google Play
Facebook