LinearLayout is getting cut off inside ScrollView Android -


i have activity in app user able vertically scroll content contained inside linearlayout in turn inside scrollview. here summary of layout xml activity looks like:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical"     android:layout_width="match_parent"     android:layout_height="match_parent">      <scrollview         android:layout_width="fill_parent"         android:layout_height="match_parent">         <linearlayout             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:layout_margin="20dip"             android:orientation="vertical">              <!-- bunch of standard widgets, omitted brevity -->              <!-- renders starting in textview -->             <!-- content begins truncated -->             <textview                 android:layout_width="fill_parent"                 android:layout_height="wrap_content"                 android:paddingleft="20dp"                 android:gravity="left"                 android:textsize="20dip"/>              <!-- view, trick horizontal row, -->             <!-- cutoff -->             <view                 android:layout_width="fill_parent"                 android:layout_height="2dip"                 android:layout_margintop="10dp"                 android:layout_marginbottom="10dp"                 android:background="@color/green" />         </linearlayout>     </scrollview> </linearlayout> 

what observing content in inner linearlayout being cutoff inside scrollview. in final textview above, when contains little text, view below render in portrait, not in landscape. when textview contains lot of text, gets cutoff in portrait mode.

i tried recommendations found on stack overflow. adding bottom padding scrollview did not resolve problem, nor did swapping scrollview nestedscrollview.

any helpful suggestions welcome. turning out blocker.

change inner linearlayout's margin padding. or, if need margin (maybe you're using custom background), wrap linearlayout in framelayout.

the scrollview taking height (or, more accurately, computing scrollable range) linearlayout. value doesn't include margins, scrollview going "too short" sum of linearlayout's top , bottom margins.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -