kchat/app/src/main/res/layout/activity_contacts_detail.xml
kaixed e1816f525a feat: 完善页面
1.完善聊天界面,好友详情页
2.抽象网络请求接口,以减少重复代码
3.引入pictureselector、spannable库
2024-11-25 22:26:51 +08:00

200 lines
6.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.activity.ContactsDetailActivity">
<com.kaixed.kchat.ui.widget.CustomTitleBar
android:id="@+id/ctb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:titleIcon="@drawable/ic_more" />
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/ifv_avatar"
android:layout_width="55dp"
android:layout_height="55dp"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:src="@drawable/ic_avatar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ctb"
app:round="8dp" />
<TextView
android:id="@+id/tv_remark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:text="糕小菜菜"
android:textColor="@color/black"
android:textSize="19sp"
app:layout_constraintStart_toEndOf="@id/ifv_avatar"
app:layout_constraintTop_toTopOf="@id/ifv_avatar" />
<TextView
android:id="@+id/tv_contact_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:text="昵称:糕小菜菜"
android:textSize="14sp"
app:layout_constraintStart_toEndOf="@id/ifv_avatar"
app:layout_constraintTop_toBottomOf="@id/tv_remark"
app:layout_goneMarginTop="0dp" />
<TextView
android:id="@+id/tv_contact_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="kid: kaixed"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="@id/tv_remark"
app:layout_constraintTop_toBottomOf="@id/tv_contact_name" />
<TextView
android:id="@+id/tv_contact_signature"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="平安顺遂,喜乐无忧"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="@id/tv_remark"
app:layout_constraintTop_toBottomOf="@id/tv_contact_id" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="ifv_avatar,tv_contact_signature" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="30dp"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@id/barrier">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:layout_marginStart="15dp"
android:background="#E5E5E5" />
<com.kaixed.kchat.ui.widget.CustomItem
android:id="@+id/ci_set_remark_and_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isTopDividerVisible="true"
app:itemName="设置备注和标签" />
<com.kaixed.kchat.ui.widget.CustomItem
android:id="@+id/ci_permission"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isTopDividerVisible="true"
app:itemName="朋友权限" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/margin"
android:background="#E5E5E5" />
<RelativeLayout
android:id="@+id/rl_contact_circle"
android:layout_width="match_parent"
android:layout_height="80dp"
android:background="@color/white"
android:paddingStart="15dp"
tools:ignore="RtlSymmetry">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="朋友圈"
android:textColor="@color/black"
android:textSize="16sp" />
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="15dp"
android:src="@drawable/icon_arrow_right" />
</RelativeLayout>
<com.kaixed.kchat.ui.widget.CustomItem
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isTopDividerVisible="true"
app:itemName="更多信息" />
<View
android:layout_width="match_parent"
android:layout_height="8dp"
android:background="#E5E5E5" />
<RelativeLayout
android:id="@+id/rl_send_message"
android:layout_width="match_parent"
android:layout_height="50dp"
android:paddingStart="15dp"
tools:ignore="RtlSymmetry">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="发消息"
android:textColor="@color/normal"
android:textSize="16sp" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:background="@color/gray" />
<RelativeLayout
android:id="@+id/rl_send_video_call"
android:layout_width="match_parent"
android:layout_height="50dp"
android:paddingStart="15dp"
tools:ignore="RtlSymmetry">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="音视频通话"
android:textColor="@color/normal"
android:textSize="16sp" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#E5E5E5" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>