我希望ExpandableListView
填满屏幕,我想要在ExpandableListView
以下的内部RelativeLayout
,但ExpandableListView
将填满整个屏幕,我看不到RelativeLayout
。如何将TextView放在ExpandableListView下并使ExpandableListView填充剩余空间屏幕?
我在做什么错?
我有这样的布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:paddingTop="@dimen/all_pages_padding_top"
tools:context="driver.mci.ir.mcicardriver.activity.MessagesActivity">
<ExpandableListView
android:id="@+id/messagesListView"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:background="@color/colorBackground"
android:layout_gravity="right|top">
</ExpandableListView>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="@+id/messagesListView"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<ImageButton
android:id="@id/imageView3"
android:layout_width="@dimen/login_icon_size"
android:layout_height="@dimen/login_icon_size"
android:scaleType="fitXY"
android:src="@drawable/sendmessage"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
/>
<EditText
android:id="@+id/userName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView3"
android:layout_toStartOf="@+id/imageView3" />
</RelativeLayout>
</RelativeLayout>
如果使用'scrollView'会怎么样? –
我不想滚动任何东西。它不应该 –
您是否想要可扩展列表视图应该是第一个元素,并且包含图像按钮和文本的第二个相对布局应该在第二个孩子的底部? @MahboobehMohammadi – Ankita