Java Question nullable colors in custom view

Erel

B4X founder
Staff member
Licensed User
Longtime User
Now there is one:
1. Set the defaultValue to Null:
B4X:
@Property(key="TextColor", displayName="Text Color", defaultValue="Null", fieldType="Color")

2. Check the color value in DesignerCreateView. It will be ViewWrapper.defaultColor if the user hasn't changed it.
B4X:
if (textColor != ViewWrapper.defaultColor) {
       et.setTextColor(textColor);
     }
 
Top