繁体   English   中英

ScrollView中的列表布局问题

[英]List layout issue inside a ScrollView

我有布局问题-我的ScrollView不能填满整个屏幕,而是-屏幕的下半部分不与滚动一起使用(我的列表动态更新)

<?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_width="match_parent" android:id="@android:id/android:list" android:layout_height="match_parent"></ListView>
    </ScrollView>

</RelativeLayout>

将RelativeLayouts的宽度和高度更改为Fill_Parent。 并更改ScrollView的Also

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM