Is it possible to change the layout width and height in Android at run time?

后端 未结 5 1822
不思量自难忘°
不思量自难忘° 2021-01-01 16:22

I have two relative layouts. Both have width of fill parent and height of 100 dip. My requirement is when I click the first layout it should shrink to 50dip height and the o

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-01 17:24

    Are you using the correct LayoutParams class for your particular view? Try using LinearLayout.LayoutParams.

提交回复
热议问题