I am facing two problems. 1. Counting multiple phone number from editText field. 2. Counting SMS number after crossing specific number of characters.
<android.support.design.widget.TextInputLayout
android:id="@+id/phoneContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:counterEnabled="true"
app:counterMaxLength="50">
<com.andreabaccega.widget.FormEditText
android:id="@+id/idContacts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Recipients"
android:ems="10"
android:inputType="phone"
android:padding="15dp" />
</android.support.design.widget.TextInputLayout>
Here,I can count character of phone number.I need to count the whole phone number.Example: If user types 012346771233,02546547589 in phone edit field,it will count as 2. But in my case ,it is counting single character.I searched lot ,but could not find any solutions.
Secondly,I have a editText field where user can input messages.When user crosses specific numbers(as 160 character) of character,it will do 2 actions.It will increase the sms number and also set character numbers(as 146 character) for next sms.
<android.support.design.widget.TextInputLayout
android:id="@+id/textContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:counterEnabled="true"
app:counterMaxLength="160">
<com.andreabaccega.widget.FormEditText
android:id="@+id/idMsg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/message"
android:inputType="text|textMultiLine|textAutoCorrect"
android:padding="10dp"
whatever:emptyErrorString="Message can not be empty."
whatever:testType="alpha" />
</android.support.design.widget.TextInputLayout>
In my case,I can count characters but how can I count sms numbers and set counterMaxLength for next sms?