How to set multi-line, first checkboxes and disable suggestions on edittext

I have edittext to reply to an email. I want to give three properties for edittext such as Multiline, First character caps and disable word sentences. I gave this in xml ...

android:inputType="textCapSentences|textVisiblePassword" 

I also tried to use the code ... etMessage.setInputType (InputType.TYPE_TEXT_FLAG_MULTI_LINE | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES); I can’t give a multi-line ... how can I achieve this

thanks

+6
source share
2 answers

I found a solution to this problem

Just set the following parameters in the xml file.

android:inputType="textCapSentences|textVisiblePassword" They are designed to set the first letter of the sentence and exclude sentences

and write the following code in ur activity

 edittext.setSingleLine(false); 
+22
source

Try setting android:inputType="textMultiLine|textCapSentences|textVisiblePassword" . What can happen is that it is multi-line, but only one line is shown where you could say android:minLines="5" or so.

+7
source

Source: https://habr.com/ru/post/894798/


All Articles