Reputation: 2087
I am evaluating Codename One for our product and struggling to do one simple thing.
I need colour of border and text of textfield to be blue when field is focused or when I am typing in some text. However, field absolutely behaves like Pressed instead of Selected. So when I'm tapping on the field the style is correct, but when and releasing my finger from that field it turns into Unselected style.
See screenshots of my builder:
You can see that even in preview it's not blue for some reason, same in preview on the right, simulator, and on real device (iPad).
Upvotes: 0
Views: 188
Reputation: 2087
In order to make it work I had to set includeNativeBool constant to false. Style is shown correctly on real device, but in Simulator text still is black instead of colour that I set.
UPDATE:
As Shai advised unsetting of includeNativeBool is not a correct solution even though it changes behaviour. Setting of pureTouchBool to false is a right way to go.
Upvotes: 0
Reputation: 52760
Selection on touch devices is only rendered when the user actually touches the device and hidden when there is no interaction. You can disable that behavior but that's probably not what you want to do and isn't the convention on touch devices such as iOS devices.
Upvotes: 0