这是可能重复的问题我已经尝试了所有的东西都没有它的工作原理,我需要使用RecyclerView
,并在底部EditText
喜欢聊天模式WhatsApp的制作和Button
下我的问题是,我可以在底部有EditText
和底部但我需要滚动查看EditText
和Button
,我应该当用户进入该网页EditText
和Buttonb should appear without scrolling and one more problem there is lots of space between two items in that
RecyclerView`如何减少空间让我发布,我所做的,到目前为止有:如何制作一个类似“RecyclerView”的WhatsApp?
我Recyclerview ChatLayout:
<?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.support.v7.widget.RecyclerView
android:id="@+id/constraint_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal"
android:weightSum="4">
<EditText
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Enter Message"
android:lines="1" />
<Button
android:id="@+id/btn_send"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="Send" />
</LinearLayout>
</RelativeLayout>
如何做到这一点为Android新的开发人员请帮助我!
添加一个*截图*为您的问题更好的可视化。 – CodeWalker
@CodeWalker请看看 –
你的问题很难理解。真!!! – androidXP