I am using PercentRelativeLayout from android percent support package. this is what I have in my layout.
<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>
I want to change the height of view_child
programmatically. How can I do that using PercentRelativeLayout.LayoutParams
or any other way.
Do you want to set a new percentage value? If yes, you need to: