Java Code Examples for android.support.v7.widget.AppCompatEditText#setMaxLines()

The following examples show how to use android.support.v7.widget.AppCompatEditText#setMaxLines() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FormElementTextMultiLineViewHolder.java    From FormMaster with Apache License 2.0 5 votes vote down vote up
public FormElementTextMultiLineViewHolder(View v, FormItemEditTextListener listener) {
    super(v);
    mTextViewTitle = (AppCompatTextView) v.findViewById(R.id.formElementTitle);
    mEditTextValue = (AppCompatEditText) v.findViewById(R.id.formElementValue);
    mFormCustomEditTextListener = listener;
    mEditTextValue.addTextChangedListener(mFormCustomEditTextListener);
    mEditTextValue.setMaxLines(4);
    mEditTextValue.setSingleLine(false);
    mEditTextValue.setInputType(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_FLAG_MULTI_LINE);
}
 
Example 2
Source File: FormElementTextSingleLineViewHolder.java    From FormMaster with Apache License 2.0 5 votes vote down vote up
public FormElementTextSingleLineViewHolder(View v, FormItemEditTextListener listener) {
    super(v);
    mTextViewTitle = (AppCompatTextView) v.findViewById(R.id.formElementTitle);
    mEditTextValue = (AppCompatEditText) v.findViewById(R.id.formElementValue);
    mFormCustomEditTextListener = listener;
    mEditTextValue.addTextChangedListener(mFormCustomEditTextListener);
    mEditTextValue.setMaxLines(1);
}