Hello!
I have a Round class that extends LinearLayout . How do I get the height and width in pixels from AttributeSet attrs constructor?

 <Round android:id="@+id/gameField" android:layout_width="fill_parent" android:layout_height="50dp" android:layout_weight="0.28" android:gravity="bottom" android:orientation="horizontal" > </Round> 

    1 answer 1

    In the designer in any way.

    The size will be known only after the onMeasure call or on the simple one after the system tries to lay out the real screen with respect to neighboring elements, screen orientation, and so on.

    • thanks, came up with another solution) - rumnakl