我开发一个应用程序在顶部需要unscrollable头,在底部中间,然后unscrollable页脚滚动ExpandableListView
。见下面的图像滚动和布局问题与ExpandableListView
的问题是ExpandableListView
滚动属性,当我扩大下页脚,unscrollable的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
扩大。
请提供一个可能的解释的解决方案。
去工作完全没有问题,但你能告诉我什么是'RelativeLayout' –
我们给Android的问题:layout_weight =” 1“扩展列表视图如果我们有LinearLayout作为父母和你的情况LinearLayout它更好的解决方案。 –
我明白你在'LinearLayout'中做了什么,但我只是想知道在使用'RelativeLayout'时出了什么问题。特别是为什么底栏也可以跟'ExpandableListView'一起滚动。 –