我把一个 LinearLayou 的高度设置成 match_parent :
<LinearLayout
android:id="@+id/list_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
我想获取 LinearLayout 的高度。
使用下面的代码:
LinearLayout ll_list = (LinearLayout)findViewById(R.id.list_layout);
int h = ll_list.getHeight();
但是返回null。
如何处理这个问题?