How to resize a custom view programmatically?

I am coding a custom view, extended from RelativeLayout, and I want to resize it programmatically, How can I do?

the custom view Class is something like:

public ActiveSlideView(Context context, AttributeSet attr){
        super(context, attr);
        LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        if(inflater != null){       
            inflater.inflate(R.layout.active_slide, this);
        }

16 Answers
16

Leave a Comment