【发布时间】:2013-10-05 16:05:12
【问题描述】:
我正在开发一个应用程序,它需要在顶部有一个不可滚动的页眉,在中间需要一个可滚动的ExpandableListView,然后在底部有一个不可滚动的页脚。见下图
问题是ExpandableListView 的可滚动属性,当我展开ExpandableListView 的父视图时,在页脚下滚动列表,无法滚动,这就是问题所在。见下文
这是xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F2B1DBF3"
android:orientation="vertical" >
<include
android:id="@+id/callheader"
android:layout_alignParentTop="true"
layout="@layout/callerheader" />
<ExpandableListView
android:id="@+id/exSavedVoiceList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/callheader"
android:groupIndicator="@drawable/drawableanimation"
android:paddingLeft="10dp" >
</ExpandableListView>
<LinearLayout
android:id="@+id/llbottom"
android:layout_width="match_parent"
android:layout_height="50sp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:background="#ff33b5e5"
android:gravity="center"
android:orientation="vertical" >
<Button
android:id="@+id/bSaveNewVoice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#ff33b5e5"
android:contentDescription="@string/add_new"
android:drawableLeft="@drawable/setting"
android:drawablePadding="40dp"
android:text="@string/add_new"
android:textColor="#FFFFFF"
android:textSize="25sp" />
</LinearLayout>
如果我将android:layout_below="@+id/exSavedVoiceList" 放入llbottom (LinearLayout),如果parent view 展开,页脚将移到下方。
请提供一个可能的解释的解决方案。
【问题讨论】:
标签: android xml android-layout scrollview expandablelistview