Reputation: 1672
I am using inputType = "number|text"
inside TextInputEditText
when I focus on this, It lets me type number only, It allows to navigate to text keyboard but not letting me type text.
Here is the code snippet:
<android.support.design.widget.TextInputLayout
android:id="@+id/availableRoof"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/radio_groupPcOfInstltion"
android:visibility="visible">
<android.support.design.widget.TextInputEditText
android:id="@+id/avlbleRoofTextField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Available Roof/Ground Area(sq.ft.)"
android:inputType="number|text"
android:text=""
android:textSize="13sp" />
</android.support.design.widget.TextInputLayout>
Please suggest a solution, so that I can type text and number both.
Upvotes: 2
Views: 3519
Reputation: 7669
Just use input type text
for getting the all possible options and textVisiblePassword
for removing the suggestion and show number in one keyboard.
android:inputType="text"
OR
android:inputType="textVisiblePassword"
Upvotes: 1
Reputation: 3576
Try adding these properties:
android:digits="abcdefghijklmnopqrstuvwxyz1234567890"
android:inputType="textVisiblePassword"
Upvotes: 0
Reputation: 1240
You need to set the inputType as text, so that you can easily enter text as well as numbers in the TextInputEditText.
Use: android:inputType="text"
Upvotes: 0