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);
     }
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…