新增文件fragment_chat.xml构建聊天界面主布局 #34

Merged
pjao9fvxr merged 1 commits from zhouzexin_branch into master 4 weeks ago

@ -0,0 +1,44 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#EDEDED"> <!-- 微信经典的浅灰背景 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_chat_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/input_layout"
android:clipToPadding="false"
android:padding="10dp" />
<LinearLayout
android:id="@+id/input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#F7F7F7"
android:elevation="4dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="8dp">
<EditText
android:id="@+id/et_chat_input"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@android:drawable/editbox_background_normal"
android:hint="向 AI 助理提问..."
android:maxLines="4"
android:padding="10dp" />
<Button
android:id="@+id/btn_chat_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:backgroundTint="#FFD700"
android:text="发送"
android:textColor="#000000" />
</LinearLayout>
</RelativeLayout>
Loading…
Cancel
Save