ab11 ab11 - 26 days ago 9
Android Question

In Android, how to re-layout views?

I am adding a series of custom views to a LinearLayout. I have overridden the onMeasure method of these custom views, to return the dimensions based on certain parameters. Based on user input, I would like to change these parameters, to change the size of the views. How can I force the LinearLayout to "re-layout" it's children, to reflect the new dimensions?

Answer

Oh... linearLayout.requestLayout().

Comments