0

I've got next problem. There is ImageView and button panel below it. I want ImageView to be as large as it needs, but if there is no enough space button panel should be present on screen and Imageview should be shrinked. What is the best solution for that?

Jurius
  • 316
  • 3
  • 9

2 Answers2

0

Have a look to the android:layout_weight attribute.

What does android:layout_weight mean?

Community
  • 1
  • 1
MRD
  • 7,146
  • 1
  • 21
  • 21
0

In case there is only 2 views in one layout (ie. Imageview and button) you can put both view in linearlayout and give value 1 for imageview weight layout (and doesn't give any value for the button)

hakim
  • 3,819
  • 3
  • 21
  • 25