3

I have a vertical LinearLayout that contains two ImageView and two Buttons. ImageViews have a weight sum of 70, Buttons have a weight sum of 30. The two buttons have a specified aspect ratio and when Android resizes them with the specified weight, it changes only the height of the button by changing the aspect ratio.

4

1 回答 1

3

使用解决:

  • ImageButton 而不是 Button
  • android:src 而不是 android:background
  • 安卓:背景=“#00000000”
  • android:scaleType="fitCenter"
  • android:layout_width="match_parent"
  • 机器人:adjustViewBounds =“真”
于 2014-08-20T13:12:04.943 回答