Android Question CustomView Animation

BarryW

Active Member
Licensed User
Longtime User
Hi masters... Why does the customview is not animating when loadlayout is called...

Im refering on iconbutton customview. It not animating

Tnx
 

DonManfred

Expert
Licensed User
Longtime User
I guess that this view doesn't use the base panel and adds itself directly to the layout.
This is the code i use in ALL my view-wrappers

B4X:
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
    }
 
Last edited:
Upvote 0

BarryW

Active Member
Licensed User
Longtime User
I dont know what to change but just try to load a layout with ur iconbutton and you see what I mean...

Tnx
 
Upvote 0
Top