List layout issue inside a ScrollView
I have a layout problem - my ScrollView
does not fill the whole screen, instead - the bottom half of the screen is not used with the scroll (my list updates dynamicly)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText android:id="@+id/newRecipeIngredientEditTextId" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" android:hint="Ingredient info" android:layout_toLeftOf="@+id/naddIngredientButtonId"></EditText>
<Button android:text="@string/addNew" android:layout_width="wrap_content" android:id="@+id/naddIngredientButtonId" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentRight="true"></Button>
<ScrollView android:layout_height="match_parent" android:layout_width="match_parent" android:id="@+id/scrollView12" android:layout_below="@+id/newRecipeIngredientEditTextId" android:layout_alignParentLeft="true" android:layout_alignParentBottom="true">
<ListView android:layout_widt开发者_开发知识库h="match_parent" android:id="@android:id/android:list" android:layout_height="match_parent"></ListView>
</ScrollView>
</RelativeLayout>
Change RelativeLayouts width and height to Fill_Parent. And change ScrollView's Also
精彩评论