Android Scrollview Won't fill parent space -


i have relative layout fills entire screen. want add scrollview in middle of wrap bunch of content can make pan when soft keyboard gets displayed. however, wrap in scrollview, bottom layout stops filling remainder of screen.

here xml have scrollview commented out.

<include     android:id="@+id/top_bar_with_save_button"     layout="@layout/top_bar_with_save_button"/>  <framelayout     android:id="@+id/log_entry_title_frame"     android:layout_below="@id/top_bar_with_save_button"     android:layout_width="match_parent"     android:layout_height="wrap_content"/>  <linearlayout     android:layout_width="match_parent"     android:layout_height="match_parent"     android:layout_below="@id/log_entry_title_frame"     android:layout_alignparentbottom="true">  <!--     <scrollview         android:layout_width="match_parent"         android:layout_height="match_parent"> -->          <relativelayout             android:layout_width="match_parent"             android:layout_height="match_parent"             android:layout_below="@+id/log_entry_title_frame"             android:orientation="vertical"             android:background="#f00">              <!-- lots of stuff in here -->             <edittext                 android:id="@+id/log_entry_notes"                 android:layout_width="match_parent"                 android:layout_height="match_parent"                 android:padding="8dp"                 android:gravity="top|left"/>          </relativelayout>  <!--     </scrollview>  --> </linearlayout> 

it looks this:

enter image description here

but remove comment scrollview compresses this:

enter image description here

why happen? need fill entire space on screen, , cannot figure out happening. can tell me how fix this? thanks!

you need add fillviewport="true" attribute scrollview tag. or can add programmatically scrollview.setfillviewport(true);. otherwise, scrollview wrap child's content height.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -