Android Question [SOLVED] Preferences Dialog Builder

JMB

Active Member
Licensed User
Longtime User
Hi there.

I've been playing around with this to build a dialog to request wind speed and direction for a B4A project I am working on.

Is it possible to use templates inside this in any way to limit the type of number?

I only want whole numbers between a certain range for each field and it would be great to be able to do that implictly in the form.

I am aware that one can use a Numeric range, but the range of values for wind direction are from 0 to 359 and it's a lot quicker to just enter the direction as a number than go through all those options!

Just wondering if that was possible.

JMB
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm not sure that Numeric Range is not your best option.
Especially if the interval can be larger than 1 (every 5 degrees for example).
Entering values with the keyboard can be cumbersome.

You can use the IsValid event to verify that the number is in the valid range. You can call to p.ScrollToItemWithError to jump to the invalid field.
 
Upvote 0

JMB

Active Member
Licensed User
Longtime User
Thanks for the reply Erel.

I can certainly look at putting in the direction with an interval of 5.

The users I am writing for want to be able to set values as fast as possible

Thanks for the
 
Upvote 0
Top