저는 채팅 애플리케이션을 만듭니다. 대화방 활동에서 리사이클 뷰 항목이 텍스트 뷰 아래에 있습니다. 데이터 항목이 증가하면 텍스트보기.리사이클 러 뷰에서 데이터 항목이 증가 할 때 텍스트 뷰 아래에 리사이클러 뷰 데이터가 있습니다.
activty_chatroom.xml는
<?xml version="1.0" encoding="utf-8"?>
<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"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.boosterfoxindia.foxindtracker.ChatRoomActivity">
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="" -->
<!--android:id="@+id/tvChat"/>-->
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/rvCM"
app:stackFromEnd="true"></android.support.v7.widget.RecyclerView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="7"
android:layout_alignParentBottom="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:padding="0dp"
android:gravity="center"
>
<EditText
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/etMessage"
android:layout_weight="6"
android:background="@drawable/chattextbox"
android:padding="10dp"
android:hint="Enter message..."
android:elevation="2dp"
android:layout_gravity="center"
android:layout_marginTop="10dp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/btnSend"
android:background="@drawable/circle"
android:orientation="vertical"
android:gravity="center"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="0dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/ic_send_white_24dp"
android:layout_gravity="center"
android:padding="10dp"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
나는 안드로이드 응용 프로그램에서 초보자입니다 때문에 내가 잘못 어딘지 알고 아닙니다, 당신은 변경해야 나에게
당신의 item.xml을 게시하시기 바랍니다 .... item.xml에 약간의 변화가 item.xml, 난 당신을 얻을 did'nt – sushildlh
이 필요합니다 .. –