张钢
2024-09-12 8aa3165449dd2757e016bdc43cfd5d111cd4c7a6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="utf-8"?>
<layout 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">
 
    <data>
        <variable
            name="bean"
            type="com.application.zhangshi_app_android.bean.HomeRootBean" />
    </data>
 
    <androidx.cardview.widget.CardView
        android:id="@+id/cv_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:cardCornerRadius="10dp"
        app:cardElevation="5dp"
        app:cardBackgroundColor="@color/white"
        android:layout_margin="1dp">
 
        <androidx.constraintlayout.utils.widget.ImageFilterView
            android:id="@+id/iv_myself"
            android:layout_width="18dp"
            android:layout_height="18dp"
            android:layout_gravity="center_vertical"
            android:layout_marginHorizontal="2dp"
            android:background="@drawable/ic_myself"
            app:roundPercent="1"
            android:elevation="10dp"
            android:visibility="gone"
            tools:visibility="visible"
            />
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginEnd="20dp"
            android:layout_marginStart="20dp"
            android:layout_marginVertical="5dp"
            android:orientation="horizontal"
            android:gravity="center"
            >
 
            <!-- 身份代数 -->
            <TextView
                android:id="@+id/tv_generation"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@{bean.identity+``}"
                android:textSize="18sp"
                android:textColor="#FFEBA4AA"
                android:gravity="center"
                android:maxLines="1"
                tools:text="2"
 
                />
 
            <!-- 头像 -->
            <androidx.constraintlayout.utils.widget.ImageFilterView
                android:id="@+id/iv_avatar"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginStart="5dp"
                android:layout_marginEnd="10dp"
                android:scaleType="fitCenter"
                app:roundPercent="1"
                app:imageUrl="@{bean.img}"
                />
            <!-- 名字 -->
            <TextView
                android:id="@+id/tv_name"
                android:layout_width="70dp"
                android:layout_height="wrap_content"
                android:text="@{bean.nickName}"
                android:textSize="16sp"
                android:textStyle="bold"
                android:textColor="#FFF6739F"
                android:ellipsize="marquee"
                android:singleLine="true"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:marqueeRepeatLimit="marquee_forever"
                />
        </LinearLayout>
 
 
    </androidx.cardview.widget.CardView>
</layout>