【发布时间】:2013-11-11 23:06:44
【问题描述】:
layout.xml 代码部分:
<ListView
android:id="@+android:id/listWhatever"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/rlSomething"
android:layout_marginBottom="I need this to set in code dinamically!"/>
Java 代码部分:
listWhatever = (ListView)findViewById(R.id.listWhatever);
RelativeLayout.LayoutParams layoutParams = (LayoutParams) listWhatever.getLayoutParams();
layoutParams.addRule(android:layout_marginBottom ... , how?);
【问题讨论】:
标签: java android layout android-relativelayout