Thank you for your suggestion.

But I found other solution after search, search and search... (seems
in this group?)

That's

<EditText android:id="@+id/age"
               android:inputType="number|phone"
               android:digits="1234567890"
               android:maxLength="2"
/>

And I've also write a if statement to check if it's an empty box.

Still thanks a lot! =]

On Apr 26, 1:37 pm, Kumar Bibek <[email protected]> wrote:
> Type Number is for phone number, it is not specifically for age. Even
> if you had one for the age, what would happen if a user enters a value
> of 300. Still then, you would have checked this value through code,
> right?
>
> So, May be use a spinner or something, or before saving the contents
> of the EditText, check it's value and prompt the user if it's wrong.
>
> Thanks and Regards,
> Kumar Bibek
>
> On Apr 23, 8:18 am, E <[email protected]> wrote:
>
>
>
>
>
> > Hi! I've searched for long-long time and I can't find the answer.
>
> > <EditText android:id="@+id/age"
> >                android:inputType="number|phone"/>
>
> > This will pop-up a soft keyboard with big buttons and some signs(- .
> > N , * # / ), right?
>
> > But the propose for this EditText is entering an age number.
>
> > Can I restrict the inputType to number AND use a phone keyboard
> > WITHOUT entering these signs?
>
> > Thank you for guiding a newcomer.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.> To post to this group, send email 
> > [email protected]
> > To unsubscribe from this group, send email 
> > to>[email protected]
> > For more options, visit this group 
> > athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.To post to this group, send email 
> [email protected]
> To unsubscribe from this group, send email 
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to