【发布时间】:2014-04-02 07:38:33
【问题描述】:
是否有任何选项可以将元素放在可扩展列表下方,让我解释一下:我已经在列表下方实现了元素,但它们的行为就像页脚 - 浮动在屏幕底部。
但是,如果我将元素放在 xml 中的列表下方,则当任何组展开时,元素都会隐藏。
目前我的布局是这样的
http://shrani.si/f/2s/ba/ga2VKfi/lay2.jpg
但我想在列表末尾这样
http://shrani.si/f/42/4m/2GAcNu6T/lay3.jpg
我现在的布局
<LinearLayout
android:id="@+id/linearLayoutListExer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip"
android:background="#ffffff"
android:gravity="center_vertical"
android:orientation="vertical">
<ExpandableListView
android:id="@+id/ExerciseELV"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearLayoutStatus"
android:layout_weight="1"
android:groupIndicator="@null" />
<LinearLayout
android:id="@+id/relativeFooter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/linearLayoutListExer"
android:background="#ffffff"
android:orientation="vertical">
<TextView
android:id="@+id/textViewBellowExercise"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dip"
android:text="The following exercises will help you lose body weight"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/textViewBellowExercise">
<Button
android:id="@+id/buttonFaceit"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@color/green"
android:text="FaceIT!"
android:textColor="@color/white" />
<Button
android:id="@+id/buttonChallenge"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@color/red"
android:text="Challenge"
android:textColor="@color/white" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
【问题讨论】:
标签: java android android-layout android-linearlayout expandablelistview