I need the user to enter hours and minutes in my app. In the calendar app there is a field to enter hours and minutes which would be perfect but I'm not sure how its done. The label "Duration" is aligned left and aligned right is a two part field to enter the hours and minutes. It's perfect for my app if only I could figure out how to do it. Can anyone help?
Great thanks for the advice. Now what if I wanted to use the same format but for something other than hours and minutes. Can I change the ranges of numbers. Can I make it so the user can select 1 to 1024 in half the field and 1-8 in the other. This seems like a very useful field if I can customize the ranges.
I think its not possible because
Hours must be between 0 and 23, and Minutes must be between 00 and 59.
if you want something else, you have to create your own custom date field.
I realize I will have to make a custom field but have never done it and was hoping for some basic code to get me started. Right now I use three seperate numeric fields for the user to enter three different ranges of numbers that all relate to each other (like a date). It would be great if I could do this with one custom field but I'm not sure where to start.
I looked into custom fields a little more and learnt how to override methods like paint and layout. So I guess what I need is a list of the methods that the date field uses so I know what to override.