Answer the question
In order to leave comments, you need to log in
Custom view size calculation?
There is actually a custom view, if you specify the exact dimensions or fill_parent for both properties (layout_width and layout_height) on layout-e, everything is OK, but if you specify wrap_content, the view is flattened to 0. Actually, as I understand it, you just need to rewrite a couple of methods for calculate the width-height, but where exactly, kick in the right direction.
Answer the question
In order to leave comments, you need to log in
developer.android.com/guide/topics/ui/custom-components.html
onMeasure() should be overridden to efficiently and accurately report the measurements of its contained parts
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question