public class IconButtonWrapper extends ViewWrapper<IconButton> implements DesignerCustomView {
[...]
/**
* programmatically add the view (the Button)
*/
public void AddToParent(ViewGroup Parent, @Pixel int left, @Pixel int top, @Pixel int width, @Pixel int height) {
//AttributeSet attrs;
Parent.addView(ib, new BALayout.LayoutParams(left, top, width, height));
}
//this method cannot be hidden.
public void DesignerCreateView(PanelWrapper base, LabelWrapper lw, anywheresoftware.b4a.objects.collections.Map props) {
ViewGroup vg = (ViewGroup) base.getObject().getParent();
AddToParent(vg, base.getLeft(), base.getTop(), base.getWidth(), base.getHeight());
base.RemoveView();
//set text properties
}