I have a layout with this statement
android:inputType="time"
I need to enter times such as 5:00 to show a count down timer as 5 minutes or 12:30:15 to show a start time hours, min, sec.
I don’t particularly like making the user enter the “:” but I don’t see a way to do a fixed format so I decided to live with it. But it doesn’t work on all my test phones.
It works fine on my Samsung tablet and my Nexus-4 but not on my Nexus-One. I would like to be able to support as many platforms as possible.
Any ideas what I can do? I thought about using a number picker but it needs API 11 and 2.3.5 is API 10.
What if you you make three EditTexts and 2 TextViews and arrange them like this and set them so that the cursor will advance from one to another.
This uses more views, but in return you get a few things. It’s harder for the user to enter something incorrect. It solves your issue with the colon in a manner that won’t care about what device it’s running on (or API lvl). You just have to manually insert the colons into your string when you pull the values out of the EditTexts.
I know I’ve filled out forms that include multiple boxes close to each other like this, so I wouldn’t think it will be confusing to your users.
EDIT: You should be able to use
android:imeOptionsin your xml orsetImeOptions(int)in java to specify that you want the next button