item_expert_intro.xml 13.3 KB
Newer Older
1 2 3 4 5 6 7
<?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>

8 9
        <import type="android.view.View" />

10 11
        <import type="android.text.TextUtils" />

12 13 14 15 16 17 18 19 20 21 22 23 24 25
        <variable
            name="item"
            type="com.ydl.confide.intro.VideoViewModel" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/black">

        <FrameLayout
            android:id="@+id/videoView"
            android:layout_width="0dp"
            android:layout_height="0dp"
万齐军 committed
26
            app:layout_constraintBottom_toTopOf="@+id/layoutCall"
27 28 29 30
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

万齐军 committed
31 32 33 34 35
        <ImageView
            android:id="@+id/ivCover"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:imageUrl="@{item.coverUrl}"
万齐军 committed
36
            app:layout_constraintBottom_toBottomOf="@+id/videoView"
万齐军 committed
37 38 39 40
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

41 42 43 44 45 46
        <ImageView
            android:id="@+id/ivPlay"
            android:layout_width="76dp"
            android:layout_height="76dp"
            android:src="@drawable/ic_video_play"
            android:visibility="gone"
万齐军 committed
47
            app:layout_constraintBottom_toBottomOf="@+id/videoView"
48 49 50 51
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

万齐军 committed
52 53 54 55 56
        <com.yidianling.common.view.ui.VoicePlayingIcon
            android:id="@+id/voicePlay"
            android:layout_width="76dp"
            android:layout_height="76dp"
            android:padding="24dp"
57
            android:visibility="gone"
万齐军 committed
58
            app:layout_constraintBottom_toBottomOf="@+id/videoView"
万齐军 committed
59 60 61 62 63 64
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:shape="@{1}"
            app:shapeBg="@{0x99000000}" />

65 66 67 68
        <View
            android:id="@+id/vDisableClick"
            android:layout_width="0dp"
            android:layout_height="0dp"
万齐军 committed
69
            android:background="@drawable/bg_expert_video_bottom_cover"
70 71 72
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
73
            app:layout_constraintTop_toTopOf="@+id/tvName"
万齐军 committed
74
            tools:visibility="visible" />
75

76 77 78 79
        <SeekBar
            android:id="@+id/seekbar"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
万齐军 committed
80 81 82 83
            android:layout_marginBottom="16dp"
            android:maxHeight="10dp"
            android:paddingTop="8dp"
            android:paddingBottom="8dp"
84 85 86 87 88
            android:paddingStart="0dp"
            android:paddingEnd="0dp"
            android:progressDrawable="@drawable/confide_seekbar_style"
            android:splitTrack="false"
            android:thumb="@drawable/confide_seekbar_thumb"
89
            app:layout_constraintBottom_toTopOf="@+id/layoutCall"
90 91 92
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent" />

93 94
        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/layoutCall"
95
            android:layout_width="160dp"
万齐军 committed
96 97
            android:layout_height="47dp"
            android:layout_marginBottom="28dp"
98
            android:background="@{item.lineStatus==3?@drawable/confide_line_bg_3:(item.lineStatus==2?@drawable/confide_line_bg_2:@drawable/confide_line_bg_1)}"
99 100
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
101 102 103 104 105 106 107 108 109
            app:layout_constraintRight_toRightOf="parent"
            tools:background="@drawable/confide_line_bg_1">

            <ImageView
                android:id="@+id/ivCall"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginRight="4dp"
                android:src="@drawable/ic_confide_call"
万齐军 committed
110
                android:visibility="@{item.lineStatus==1?View.VISIBLE:View.GONE}"
111
                app:layout_constraintBottom_toBottomOf="parent"
112
                app:layout_constraintHorizontal_chainStyle="packed"
113 114 115 116 117 118 119 120
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@+id/tvCall"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/tvCall"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
万齐军 committed
121
                android:text="立即拨打"
122
                android:textColor="@color/white"
123
                android:textSize="16sp"
万齐军 committed
124
                android:textStyle="bold"
125
                app:confideLineText="@{item.lineStatus}"
126
                app:layout_constraintBottom_toTopOf="@+id/tvTime"
127 128 129
                app:layout_constraintLeft_toRightOf="@+id/ivCall"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
万齐军 committed
130
                app:layout_constraintVertical_chainStyle="packed" />
131 132 133 134 135 136 137 138 139 140 141 142 143 144

            <TextView
                android:id="@+id/tvTime"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@{item.remainingTime}"
                android:textColor="@color/white"
                android:textSize="10sp"
                android:visibility="@{TextUtils.isEmpty(item.remainingTime)?View.GONE:View.VISIBLE}"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintLeft_toLeftOf="@+id/tvCall"
                app:layout_constraintRight_toRightOf="@+id/tvCall"
                app:layout_constraintTop_toBottomOf="@+id/tvCall"
                tools:text="剩余1分40秒" />
145
        </androidx.constraintlayout.widget.ConstraintLayout>
146

147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/bg_confide_free"
            android:paddingLeft="5dp"
            android:paddingTop="2dp"
            android:paddingRight="5dp"
            android:paddingBottom="2dp"
            android:text="首单免费"
            android:textColor="@color/white"
            android:textSize="11sp"
            android:visibility="@{item.showFreeTag?View.VISIBLE:View.GONE}"
            app:layout_constraintCircle="@+id/layoutCall"
            app:layout_constraintCircleAngle="70"
            app:layout_constraintCircleRadius="70dp" />

163 164
        <TextView
            android:id="@+id/tvTag"
万齐军 committed
165
            android:layout_width="0dp"
166 167
            android:layout_height="wrap_content"
            android:layout_marginLeft="12dp"
万齐军 committed
168
            android:layout_marginRight="40dp"
169
            android:layout_marginBottom="60dp"
万齐军 committed
170
            android:maxLines="1"
171 172 173
            android:text="@{item.tag}"
            android:textColor="#99FFFFFF"
            android:textSize="13sp"
174
            app:layout_constraintBottom_toTopOf="@+id/layoutCall"
175
            app:layout_constraintLeft_toLeftOf="parent"
万齐军 committed
176
            app:layout_constraintRight_toLeftOf="@+id/btnShare"
177 178 179 180
            tools:text="tag|tag|tag" />

        <TextView
            android:id="@+id/tvIntro"
万齐军 committed
181
            android:layout_width="0dp"
182
            android:layout_height="wrap_content"
万齐军 committed
183
            android:layout_marginRight="40dp"
184
            android:layout_marginBottom="8dp"
万齐军 committed
185
            android:maxLines="3"
186 187 188 189 190
            android:text="@{item.intro}"
            android:textColor="@color/white"
            android:textSize="15sp"
            app:layout_constraintBottom_toTopOf="@+id/tvTag"
            app:layout_constraintLeft_toLeftOf="@+id/tvTag"
万齐军 committed
191
            app:layout_constraintRight_toLeftOf="@+id/btnShare"
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
            tools:text="tag|tag|tag" />

        <TextView
            android:id="@+id/tvName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:text="@{item.name}"
            android:textColor="@color/white"
            android:textSize="19sp"
            app:layout_constraintBottom_toTopOf="@+id/tvIntro"
            app:layout_constraintLeft_toLeftOf="@+id/tvTag"
            tools:text="tag|tag|tag" />

        <TextView
            android:id="@+id/tvConfideCount"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
万齐军 committed
210
            android:layout_marginLeft="8dp"
万齐军 committed
211
            android:layout_marginBottom="1dp"
万齐军 committed
212
            android:text="@{item.count}"
万齐军 committed
213
            android:textColor="@color/white"
214 215 216 217 218
            android:textSize="13sp"
            app:layout_constraintBottom_toBottomOf="@+id/tvName"
            app:layout_constraintLeft_toRightOf="@+id/tvName"
            tools:text="tag|tag|tag" />

万齐军 committed
219
        <LinearLayout
220 221 222 223
            android:id="@+id/btnShare"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="18dp"
万齐军 committed
224 225
            android:layout_marginBottom="55dp"
            android:orientation="vertical"
226
            app:layout_constraintBottom_toTopOf="@+id/layoutCall"
万齐军 committed
227
            app:layout_constraintRight_toRightOf="parent">
228

万齐军 committed
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
            <ImageView
                android:layout_width="29dp"
                android:layout_height="29dp"
                android:src="@drawable/ic_video_share" />

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/text_share" />
            <!--<TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="4dp"
                android:text="分享"
                android:textColor="@color/white"
                android:textSize="11sp" />-->
        </LinearLayout>

        <LinearLayout
249 250 251 252 253
            android:id="@+id/btnEvaluate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="18dp"
            android:layout_marginBottom="20dp"
万齐军 committed
254
            android:orientation="vertical"
255
            app:layout_constraintBottom_toTopOf="@+id/btnShare"
万齐军 committed
256
            app:layout_constraintRight_toRightOf="parent">
257

万齐军 committed
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
            <ImageView
                android:layout_width="29dp"
                android:layout_height="29dp"
                android:src="@drawable/ic_video_eval" />

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/text_eval" />
            <!--<TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="4dp"
                android:text="评价"
                android:textColor="@color/white"
                android:textSize="11sp" />-->
        </LinearLayout>

        <LinearLayout
278 279 280 281 282
            android:id="@+id/btnChat"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="18dp"
            android:layout_marginBottom="20dp"
万齐军 committed
283 284
            android:orientation="vertical"
            android:gravity="center"
285
            app:layout_constraintBottom_toTopOf="@+id/btnEvaluate"
万齐军 committed
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305
            app:layout_constraintRight_toRightOf="parent">

            <ImageView
                android:layout_width="29dp"
                android:layout_height="29dp"
                android:src="@drawable/ic_video_chat" />

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/text_chat" />
            <!--<TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="4dp"
                android:text="私聊"
                android:textColor="@color/white"
                android:textSize="11sp" />-->
        </LinearLayout>
306 307

        <ImageView
万齐军 committed
308
            android:id="@+id/ivAvatar"
万齐军 committed
309 310
            android:layout_width="48dp"
            android:layout_height="48dp"
311
            android:layout_marginRight="10dp"
312
            android:layout_marginBottom="20dp"
万齐军 committed
313
            android:padding="1dp"
万齐军 committed
314
            app:circle="@{true}"
315
            app:imageUrl="@{item.avatar}"
316
            app:layout_constraintBottom_toTopOf="@+id/btnChat"
万齐军 committed
317 318 319 320 321
            app:layout_constraintRight_toRightOf="parent"
            app:shape="@{1}"
            app:shapeBg="@{0x00FFFFFF}"
            app:shapeStrokeColor="@{0xFFFFFFFF}"
            app:shapeStrokeWidth="@{1}" />
322 323
    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>