【问题标题】:scrollview and expandablelistview cutscrollview 和 expandablelistview 剪切
【发布时间】:2013-12-11 17:56:42
【问题描述】:

我有一个滚动视图,在 LinearLayout 和可扩展列表视图内。但是 expandablelistview 在下面被剪掉了。但是如果我删除滚动视图,expandablelistview 看起来不错。这是我的代码:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/scrollView1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
         android:fillViewport="true"
        >

<LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/fondo"
    android:orientation="vertical" >

     <ExpandableListView
        android:id="@+id/lvExp"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">

    </ExpandableListView>...

我能做什么?谢谢

【问题讨论】:

    标签: android scrollview expandablelistview cut


    【解决方案1】:
    *//make height to fill parent
    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/scrollView1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" //make height to fill parent
             android:fillViewport="true"
            >
    <LinearLayout 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/fondo"
        android:orientation="vertical" >
         <ExpandableListView
            android:id="@+id/lvExp"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content">
        </ExpandableListView>...*
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-10-09
      • 2013-05-28
      • 1970-01-01
      • 2020-08-13
      • 1970-01-01
      • 2014-06-14
      • 1970-01-01
      • 2011-12-06
      相关资源
      最近更新 更多