0
我有一個Activity
與ExpandableListView
和隱藏Fragment
它下面。當你點擊一個ListView的子元素時,片段變得可見並且從平滑的動畫的底部出現。問題是當出現片段時,它與列表的一部分重疊,所以我看不到底部的元素。爲了解決這個問題,我假設我可以在彈出片段的同時調整listView的高度,但我不知道該怎麼做。任何想法將不勝感激。如何調整listView的高度到它下面的一個片段
下面是什麼它顯示片段之前,看起來像一個例子:
而這正是發生後,(我不能下來了滾動):
這裏的佈局:
<RelativeLayout xmlns:
android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/main_background"
android:orientation="vertical">
<ExpandableListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@drawable/list_divider"
android:dividerHeight="1dp"
android:childDivider="@drawable/list_divider"
android:fontFamily="sans-serif-thin"
android:groupIndicator="@null" />
<FrameLayout
android:id="@+id/musicBarContainer"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_alignParentBottom="true"
android:clickable="true"
android:fontFamily="sans-serif-thin" />
</RelativeLayout>