how to check if edittext is single line android -


i making custom android keyboard. want make sure when user press enter key proper editoraction took place. therefore want know there way check if edittext single line or not? or there way check min , max lines of editext?

in onstartinput(editorinfo info) , onstartinputview(editorinfo info) callbacks editorinfo passed in.

to check if it's multiline can do:

if (0 != (info.inputtype & inputtype.type_text_flag_multi_line)) {    //this multiline text field } 

see type_text_flag_multi_line


Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -