Android Question [solved] CustomView Properties: min/max range reading

udg

Expert
Licensed User
Hi all,
is there a way to read from code the values for MinRange and MaxRange optional values for a Designer property of type int?
Or are they used just for limiting the available settings while in the Designer?

TIA
 

Erel

Administrator
Staff member
Licensed User
It is not possible. They are only available in the designer.
 

udg

Expert
Licensed User
Thank you, Erel.
Could it be a subject for a wish or you can anticipate that it will be too complicated to achieve due to the way the Designer is currently made?
I'm thinking about an additional PropsOptions(Key) returning a map (so to accomodate multiple values and types).
 

Erel

Administrator
Staff member
Licensed User
It doesn't really fit in the current model where each item has a single value. I also don't see a strong use case here. You are the one who is setting the ranges so it should be simple to set the same values in the custom view code.
 

udg

Expert
Licensed User
You are the one who is setting the ranges so it should be simple to set the same values in the custom view code.
The need arises from a CustomView (a wheel selector) where I'd like to construct the list of values based on what the programmer sets as Min/Max (or List) when adding the component in the Designer.
Anyway, no problem. I already use a "custom" setup for lists passed by code.
My request was just for some kind of convenience and clearer code. Thanks again.
 

Erel

Administrator
Staff member
Licensed User
MinRange and MaxRange are not user configurable. They are set in the custom view code. I don't see how they can help you here.

Sounds like you need to add two properties for these values.
 

udg

Expert
Licensed User
You're right.
I didn't recall that those values aren't visible in the Designer itself.
Adding two props is one way to solve the problem, but it won't help in case of a list of values (like weekdays, months..).
For my needs I use a SetList or equivalent public sub to be called as part of the initialization, so no problem.
 
Top