這是可能重複的問題我已經嘗試了所有的東西都沒有它的工作原理,我需要使用
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