Android Question Designer Script Variant - Text Styles

jaraiza

Active Member
Licensed User
Longtime User
Hi,

I've a problem with Hint text length in small screens. An EditText text has a "Type Cellphone" hint, but in a small screen the text is truncated. So I tried to change it inside "Script Variant" to txtPhone.Hint = "Phone" when the screen is small, but "Hit" is not recognized inside designer Scripts.

I tried to use .text instead .hint, but as you may guess, when the user types the phone number the control get mixed text and numbers.

I'm currently checking the sizes with:

B4X:
Dim lv As LayoutValues
lv = GetDeviceLayoutValues

I'm using lv.width and lv.height to determine if I should change hints from code. Is there any way to do it from designer?

Thanks!!
 
Last edited:

jaraiza

Active Member
Licensed User
Longtime User
But I try again: set the hint by code, checking the orientation (If 100%x < 100%y Then "portrait")
That's the point , I'm jut doing it by code with "LayoutValues" so I can determine if any size is equal or below 320px (horizontal or vertical). What I'm asking for is any way to do it through script variants:



If I try to use "hint" property there, I get an error. Other properties are available, like Text, TextSize, etc.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…