【发布时间】:2015-08-30 02:40:49
【问题描述】:
我正在使用来自 android percent 支持包的 PercentRelativeLayout。这就是我的布局。
<android.support.percent.PercentRelativeLayout
android:id="@+id/view_parent"
app:layout_heightPercent="68%" android:visibility="invisible"
android:layout_width="match_parent"
android:background="@color/mountain_meadow" android:layout_alignParentTop="true"
android:layout_height="wrap_content">
<View android:id="@+id/view_child" android:layout_width="match_parent" app:layout_heightPercent="30%"
android:layout_alignParentBottom="true"
/>
</android.support.percent.PercentRelativeLayout>
我想以编程方式更改view_child 的高度。如何使用PercentRelativeLayout.LayoutParams 或任何其他方式做到这一点。
【问题讨论】:
标签: java android android-relativelayout android-percent-library