Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ScrollView not displaying some UI elements

I'm developing an application with executes searches via an API on a web server. My search page displays well in portait mode but is too big for landscape mode so I've decided to simply contain all UI elements in a ScrollView by customising the XML in layout-land folder. The problem is, the buttons on the bottom of my form are not being shown in landscape ScrollView. I don't use ScrollView in portrait so maybe that's the problem? The layout XML is like this:

<LinearLayout>
<ScrollView>
    <LinearLayout>
        <TableLayout>
            <!-- stuff here is being shown (table with TextViews and EditTexts -->
        </TableLayout>
        <LinearLayout>
            <!-- stuff here is not being shown (3 Buttons) -->
        </LinearLayout>
    </LinearLayout>
</ScrollView>

like image 605
TomaszRykala Avatar asked Jul 24 '26 19:07

TomaszRykala


1 Answers

Most likely you forgot to set android:orientation="vertical" to your LinearLayout (direct child of ScrollView).

like image 168
Konstantin Burov Avatar answered Jul 27 '26 08:07

Konstantin Burov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!