1

I'm working on an Android app and need to email to various users. Currently I have an 'EditText' which is configured as:

android:inputType="textEmailAddress"

Once a button is pressed an email is sent to the address specified in this field. But I would to create a multi address input list. Is there a way to do it without change the 'EditText' to multiple lines and parsing the string myself?

Googled it but could not find a solution. Any suggestions?

Thanks in advance.

David Faizulaev
  • 4,651
  • 21
  • 74
  • 124

2 Answers2

2

There is a lines and minLines attribute in EditText. Example would be:

<EditText
     android:inputType="textEmailAddress" <!-- email address -->
     android:lines="8" <!-- Total Lines prior display -->
     android:minLines="6" <!-- Minimum lines -->
</EditText>

See this answer for further details.

Community
  • 1
  • 1
Daniel Burgner
  • 224
  • 2
  • 6
  • 16
1

You may use a separator to separate the emails: first_email@gmail.com, second_email@gmail.com and so on. In your code call split() method to get an array of emails from this long line.

Yury Fedorov
  • 14,508
  • 6
  • 50
  • 66