我開發一個應用程序在頂部需要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'一起滾動。 –