1

I have a LinearLayout with a ScrollView and a TextView below it. I want the TextView to take up 1/8th of the screen. So I set its weight to 1 and the ScrollView's weight to 7.

But now on small screens, especially with soft keyboard, the text will be cut off. Is there any way to divide the screen like that, but still make sure the TextView has enough space for its content?

I tried android:minHeight, which apparently does nothing in this case and setting android:layout_height to anything but 0dp will make the View bigger no matter what, which is not what I need.

BeneStr
  • 337
  • 2
  • 12

1 Answers1

0

You could either:

  1. Have a different layout for small screens: http://developer.android.com/guide/practices/screens_support.html

  2. Create your own MinHeightFrameLayout, extending FrameLayout, and override onMeasure() to supply a minimum height: Authorative way to override onMeasure()?

Community
  • 1
  • 1
Vaiden
  • 15,728
  • 7
  • 61
  • 91