Android Alignparentbottom=true在relativelayout中覆盖整个屏幕
我想创建类似whatsapp消息传递布局的布局。编辑文本并发送图标底部和上面的列表。Edittext可以多行,我希望图标始终位于底部。但是当我使ImageView alignparentbottom=true bottomRl覆盖整个屏幕时Android Alignparentbottom=true在relativelayout中覆盖整个屏幕,android,android-layout,android-relativelayout,Android,Android Layout,Android Relativelayout,我想创建类似whatsapp消息传递布局的布局。编辑文本并发送图标底部和上面的列表。Edittext可以多行,我希望图标始终位于底部。但是当我使ImageView alignparentbottom=true bottomRl覆盖整个屏幕时 //回收视图,在底部视图上方 这是安卓bug还是我做错了什么 谢谢你的回答 解决方案 <ImageView android:id="@+id/imageViewSend" android:layout
//回收视图,在底部视图上方
这是安卓bug还是我做错了什么
谢谢你的回答
解决方案
<ImageView
android:id="@+id/imageViewSend"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_alignBottom="@+id/editTextEntry"
android:layout_alignParentEnd="true"
android:src="@drawable/ic_send" />
试试,android:layout\u alignBottom=“@+id/edittext”
<RelativeLayout
android:id="@+id/bottomRl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true">
<EditText
android:id="@+id/edittext"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ImageView
android:padding="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_menu_camera"
android:layout_alignBottom="@+id/edittext"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
试试,android:layout\u alignBottom=“@+id/edittext”
<RelativeLayout
android:id="@+id/bottomRl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true">
<EditText
android:id="@+id/edittext"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ImageView
android:padding="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_menu_camera"
android:layout_alignBottom="@+id/edittext"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
试着这样做:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RelativeLayout
android:id="@+id/bottomRl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<EditText
android:id="@+id/editTxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toStartOf="@id/imageV"
android:text="vsdvsvsvsv c xc x x xdfbdcx fv"/>
<ImageView
android:id="@+id/imageV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:src="@mipmap/ic_launcher" />
</RelativeLayout>
</RelativeLayout>
试着这样做:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<RelativeLayout
android:id="@+id/bottomRl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<EditText
android:id="@+id/editTxt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toStartOf="@id/imageV"
android:text="vsdvsvsvsv c xc x x xdfbdcx fv"/>
<ImageView
android:id="@+id/imageV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:src="@mipmap/ic_launcher" />
</RelativeLayout>
</RelativeLayout>