我有一个线性布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_menu"
android:layout_width="fill_parent"
android:layout_height="70px"
android:layout_alignParentBottom="true"
android:background="@drawable/footer_bar"
android:gravity="center" >
</LinearLayout>
当我设置条件时
if (constant.getscreenresolution() >= 800) {
//i want to make it height * 2
}
那么如何设置布局参数(layout params)呢?
05-28 13:41:11.125: E/AndroidRuntime(16380): java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.widget.RelativeLayout$LayoutParams
我的布局是线性的,为什么会涉及到相对布局呢? - Alan Lai