From fe04012057d024770e0180543483d393281a542f Mon Sep 17 00:00:00 2001
From: zhujie <leon.zhu@cloudroam.com.cn>
Date: 星期四, 03 四月 2025 09:18:16 +0800
Subject: [PATCH] Merge branch 'master' of http://47.96.225.205:8888/r/FirstApp2
---
app/src/main/res/layout/fragment_member_info_card.xml | 96 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 96 insertions(+), 0 deletions(-)
diff --git a/app/src/main/res/layout/fragment_member_info_card.xml b/app/src/main/res/layout/fragment_member_info_card.xml
new file mode 100644
index 0000000..d1789c5
--- /dev/null
+++ b/app/src/main/res/layout/fragment_member_info_card.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+
+ <data>
+ <variable
+ name="viewModel"
+ type="com.example.firstapp.ui.vip.MemberInfoCardViewModel"/>
+ </data>
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".ui.vip.MemberInfoCardFragment">
+
+ <!-- CardView 内部的内容 -->
+ <androidx.cardview.widget.CardView
+ android:id="@+id/memberCardCardView"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="15dp"
+ android:layout_marginTop="10dp"
+ android:layout_marginRight="15dp"
+ android:elevation="0dp"
+ android:clipChildren="false"
+ android:clipToOutline="true"
+ app:cardCornerRadius="10dp"> <!-- 设置CardView的elevation -->
+
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/memberCard"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
+ tools:ignore="MissingConstraints"
+ android:background="@android:color/transparent"
+ >
+
+ <ImageView
+ android:id="@+id/memberAvatarView"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:layout_marginLeft="10dp"
+ android:layout_marginRight="10dp"
+ android:scaleType="centerCrop"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <TextView
+ android:id="@+id/phoneNumberText"
+ android:layout_width="120dp"
+ android:layout_height="40dp"
+ android:gravity="center"
+ android:text="@{viewModel.phoneNumber}"
+ app:layout_constraintStart_toEndOf="@id/memberAvatarView"
+ app:layout_constraintTop_toTopOf="parent" />
+
+<!-- <TextView-->
+<!-- android:id="@+id/memberStatus"-->
+<!-- android:layout_width="match_parent"-->
+<!-- android:layout_height="wrap_content"-->
+<!-- android:gravity="start"-->
+<!-- android:text="@{viewModel.memberStatus}"-->
+<!-- app:layout_constraintStart_toEndOf="@id/memberCard"-->
+<!-- app:layout_constraintTop_toTopOf="parent" />-->
+
+ <TextView
+ android:id="@+id/memberStatus"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="start"
+ android:text="@{viewModel.memberStatus}"
+ android:layout_marginLeft="8dp"
+ android:padding="2dp"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/memberAvatarView" />
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+
+ </androidx.cardview.widget.CardView>
+
+ <!-- 悬浮的 ImageView, 位于右侧 -->
+ <ImageView
+ android:id="@+id/memberImageView"
+ android:layout_width="80dp"
+ android:layout_height="80dp"
+ android:layout_marginTop="-10dp"
+ android:layout_marginRight="40dp"
+ android:scaleType="centerCrop"
+ android:layout_gravity="end|top"
+ android:elevation="4dp" /> <!-- 设置memberImageView的elevation,确保它在上层 -->
+
+ </FrameLayout>
+
+</layout>
\ No newline at end of file
--
Gitblit v1.9.3