保存新的送礼的UI

This commit is contained in:
ningwenqiang 2024-09-25 17:23:15 +08:00
parent b5401503e9
commit 6ba18e8ba2
39 changed files with 485 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff171724" />
<corners
android:topLeftRadius="17dp"
android:topRightRadius="17dp" />
</shape>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 7%不透明度的白色-->
<solid android:color="#11FFFFFF" />
<corners
android:bottomLeftRadius="4dp"
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp"
android:topRightRadius="4dp" />
</shape>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 7%不透明度的白色-->
<solid android:color="#11FFFFFF" />
<corners
android:bottomLeftRadius="17dp"
android:bottomRightRadius="17dp"
android:topLeftRadius="17dp"
android:topRightRadius="17dp" />
</shape>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#FFF026" />
<corners
android:bottomLeftRadius="17dp"
android:bottomRightRadius="17dp"
android:topLeftRadius="17dp"
android:topRightRadius="17dp" />
</shape>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ff6e84e7" />
<corners
android:bottomLeftRadius="10dp"
android:bottomRightRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp" />
</shape>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
@ -28,10 +29,7 @@
android:visibility="invisible">
<include
layout="@layout/view_blind_box" />
</FrameLayout>
<FrameLayout
@ -124,7 +122,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:visibility="gone">
android:visibility="gone"
tools:visibility="visible">
<FrameLayout
android:layout_width="40dp"
@ -421,6 +420,7 @@
android:layout_marginRight="10dp"
android:layout_marginBottom="5dp"
android:background="@mipmap/icon_live_gift_lian"
tools:visibility="visible"
android:visibility="gone">
<TextView

View File

@ -0,0 +1,429 @@
<?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:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="vertical">
<!-- 布局从下而上写的 -->
<!-- 底部背景大的背景 -->
<View
android:id="@+id/giftBg"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="-20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/lvTipsTv"
tools:background="@drawable/bg_gift_bottom_bg" />
<!--底部送礼选择数量备份 -->
<View
android:id="@+id/giftSendBgV"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="16dp"
android:background="@drawable/bg_gift_send"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="3.74"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintWidth_percent="0.34" />
<TextView
android:id="@+id/liveGiftSend"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/bg_gift_send_btn"
android:gravity="center"
android:text="@string/live_gift_send"
android:textColor="@color/black1"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="@+id/giftSendBgV"
app:layout_constraintDimensionRatio="1.82"
app:layout_constraintEnd_toEndOf="@+id/giftSendBgV"
app:layout_constraintTop_toTopOf="@+id/giftSendBgV" />
<ImageView
android:id="@+id/liveGiftImg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:src="@mipmap/ic_gift_righit_arrow"
app:layout_constraintBottom_toBottomOf="@+id/giftSendBgV"
app:layout_constraintEnd_toStartOf="@+id/liveGiftSend"
app:layout_constraintTop_toTopOf="@+id/giftSendBgV" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="@+id/giftSendBgV"
app:layout_constraintEnd_toStartOf="@+id/liveGiftImg"
app:layout_constraintHorizontal_bias="0.7"
app:layout_constraintStart_toStartOf="@+id/giftSendBgV"
app:layout_constraintTop_toTopOf="@+id/giftSendBgV"
tools:text="999" />
<!--底部钻石数量 -->
<ImageView
android:id="@+id/diamondImg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:src="@mipmap/ic_diamond_3"
app:layout_constraintBottom_toBottomOf="@+id/giftSendBgV"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/giftSendBgV" />
<TextView
android:id="@+id/diamondNumberTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="@color/white"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/diamondImg"
app:layout_constraintStart_toEndOf="@+id/diamondImg"
app:layout_constraintTop_toTopOf="@+id/diamondImg"
tools:text="28000000" />
<ImageView
android:id="@+id/diamondGoImg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:src="@mipmap/ic_gift_righit_arrow"
app:layout_constraintBottom_toBottomOf="@+id/diamondImg"
app:layout_constraintStart_toEndOf="@+id/diamondNumberTv"
app:layout_constraintTop_toTopOf="@+id/diamondImg" />
<View
android:id="@+id/diamondClickView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
app:layout_constraintBottom_toBottomOf="@+id/giftSendBgV"
app:layout_constraintEnd_toEndOf="@+id/diamondGoImg"
app:layout_constraintStart_toStartOf="@+id/diamondImg"
app:layout_constraintTop_toTopOf="@+id/giftSendBgV"
tools:visibility="gone" />
<!--底部金豆数量 -->
<ImageView
android:id="@+id/goldBeanImg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:src="@mipmap/ic_golden_beans_3"
app:layout_constraintBottom_toBottomOf="@+id/giftSendBgV"
app:layout_constraintStart_toEndOf="@+id/diamondGoImg"
app:layout_constraintTop_toTopOf="@+id/giftSendBgV" />
<TextView
android:id="@+id/goldNumberTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="@color/white"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/goldBeanImg"
app:layout_constraintStart_toEndOf="@+id/goldBeanImg"
app:layout_constraintTop_toTopOf="@+id/goldBeanImg"
tools:text="28000000" />
<!--礼物列表 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/giftRecyclerView"
android:layout_width="0dp"
android:layout_height="234dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toTopOf="@+id/giftSendBgV"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<!--礼物栏的Title -->
<!--顶部Warp -->
<TextView
android:id="@+id/giftWrapTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_marginBottom="10dp"
android:padding="6dp"
android:text="@string/live_wrap"
android:textColor="#CCCDCE"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@+id/giftRecyclerView"
app:layout_constraintEnd_toEndOf="parent" />
<View
android:layout_width="1dp"
android:layout_height="11dp"
android:layout_gravity="center_vertical"
android:layout_marginTop="1dp"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="@+id/giftWrapTv"
app:layout_constraintEnd_toStartOf="@+id/giftWrapTv"
app:layout_constraintTop_toTopOf="@+id/giftWrapTv" />
<View
android:id="@+id/giftWrapRedPoint"
android:layout_width="6dp"
android:layout_height="6dp"
android:background="@drawable/bg_red_point"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="@+id/giftWrapTv"
app:layout_constraintTop_toTopOf="@+id/giftWrapTv"
tools:visibility="visible" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/giftTitleRecyclerView"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@+id/giftWrapTv"
app:layout_constraintEnd_toStartOf="@+id/giftWrapTv"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/giftWrapTv"
tools:layout_height="0dp" />
<!--升级进度条 -->
<TextView
android:id="@+id/lvTitleTv"
android:layout_width="40dp"
android:layout_height="20dp"
android:layout_gravity="center"
android:layout_marginStart="18dp"
android:layout_marginBottom="12dp"
android:background="@drawable/bg_live_gift_lv"
android:gravity="center"
android:textColor="@color/white"
android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/giftTitleRecyclerView"
app:layout_constraintStart_toStartOf="parent"
tools:text="LV.8" />
<TextView
android:id="@+id/lvTipsTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:layout_marginTop="-1dp"
android:textColor="@color/white"
android:textSize="10sp"
app:layout_constraintStart_toEndOf="@+id/lvTitleTv"
app:layout_constraintTop_toTopOf="@+id/lvTitleTv"
tools:text="升至LV.9还需13000,00经验值" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:src="@mipmap/ic_gift_righit_arrow"
app:layout_constraintBottom_toBottomOf="@+id/lvTipsTv"
app:layout_constraintStart_toEndOf="@+id/lvTipsTv"
app:layout_constraintTop_toTopOf="@+id/lvTipsTv" />
<ProgressBar
android:id="@+id/week_progressbar"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="0dp"
android:layout_height="3dp"
android:layout_marginStart="1dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="10dp"
android:progressDrawable="@drawable/bg_gift_progressbar"
app:layout_constraintStart_toStartOf="@+id/lvTipsTv"
app:layout_constraintTop_toBottomOf="@+id/lvTipsTv"
app:layout_constraintWidth_percent="0.54"
tools:progress="10" />
<!--开通贵族 -->
<TextView
android:id="@+id/openVipTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="开通贵族"
android:textColor="@color/white"
android:textSize="11sp"
app:layout_constraintBottom_toBottomOf="@+id/lvTitleTv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.68"
app:layout_constraintStart_toEndOf="@+id/week_progressbar"
app:layout_constraintTop_toTopOf="@+id/lvTitleTv" />
<ImageView
android:id="@+id/openVipImg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="2dp"
android:src="@mipmap/ic_open_noble_3"
app:layout_constraintBottom_toBottomOf="@+id/openVipTv"
app:layout_constraintEnd_toStartOf="@+id/openVipTv"
app:layout_constraintTop_toTopOf="@+id/openVipTv" />
<View
android:id="@+id/openVipBg"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="-6dp"
android:layout_marginTop="-4dp"
android:layout_marginEnd="-6dp"
android:layout_marginBottom="-4dp"
android:background="@drawable/bg_gift_openvip"
app:layout_constraintBottom_toBottomOf="@+id/openVipTv"
app:layout_constraintEnd_toEndOf="@+id/openVipTv"
app:layout_constraintStart_toStartOf="@+id/openVipImg"
app:layout_constraintTop_toTopOf="@+id/openVipTv" />
<!-- 连击 -->
<ImageView
android:id="@+id/continuousClicksBg"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="5dp"
android:src="@drawable/bg_continuous_clicks"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintWidth_percent="0.2" />
<View
android:id="@+id/continuousBgCenter"
android:layout_width="4dp"
android:layout_height="4dp"
app:layout_constraintBottom_toBottomOf="@+id/continuousClicksBg"
app:layout_constraintEnd_toEndOf="@+id/continuousClicksBg"
app:layout_constraintStart_toStartOf="@+id/continuousClicksBg"
app:layout_constraintTop_toTopOf="@+id/continuousClicksBg" />
<TextView
android:id="@+id/continuousClicksTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:text="@string/live_gift_send_lian"
android:textColor="@color/black1"
android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@+id/continuousBgCenter"
app:layout_constraintEnd_toEndOf="@+id/continuousClicksBg"
app:layout_constraintStart_toStartOf="@+id/continuousClicksBg" />
<TextView
android:id="@+id/lian_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textColor="@color/black1"
android:textSize="13sp"
app:layout_constraintEnd_toEndOf="@+id/continuousClicksBg"
app:layout_constraintStart_toStartOf="@+id/continuousClicksBg"
app:layout_constraintTop_toBottomOf="@+id/continuousBgCenter"
tools:text="到期时" />
<androidx.constraintlayout.widget.Group
android:id="@+id/continuousClickGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="continuousClicksBg,continuousBgCenter,continuousClicksTv,lian_text"
tools:visibility="gone" />
<!--开始写顶部布局 -->
<ImageView
android:id="@+id/operate_image"
android:layout_width="122dp"
android:layout_height="50dp"
android:layout_gravity="end|bottom"
android:layout_marginEnd="5dp"
android:layout_marginBottom="2dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toTopOf="@+id/giftBg"
app:layout_constraintEnd_toEndOf="parent" />
<include
android:id="@+id/blind_box"
layout="@layout/view_blind_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:visibility="invisible"
app:layout_constraintBottom_toTopOf="@+id/giftBg"
app:layout_constraintEnd_toEndOf="parent"
tools:visibility="visible" />
<!--赞助信息 -->
<ImageView
android:id="@+id/giftSponsorBgImg"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="0dp"
android:layout_height="28dp"
android:layout_marginBottom="5dp"
android:layout_marginStart="25dp"
android:layout_marginEnd="25dp"
android:scaleType="fitXY"
app:layout_constraintBottom_toTopOf="@+id/giftBg"
android:src="@mipmap/background_live_gift_gift_itle" />
<ImageView
android:id="@+id/gift_itle"
android:layout_width="54dp"
android:layout_height="13dp"
android:layout_marginStart="13dp"
app:layout_constraintTop_toTopOf="@+id/giftSponsorBgImg"
app:layout_constraintBottom_toBottomOf="@+id/giftSponsorBgImg"
app:layout_constraintStart_toStartOf="@+id/giftSponsorBgImg"
android:src="@mipmap/icon_live_gift_gift_itle" />
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/naming_avatar"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_centerHorizontal="true"
android:layout_marginStart="6dp"
android:scaleType="centerCrop"
android:src="@drawable/m_chu_xia"
app:layout_constraintTop_toTopOf="@+id/giftSponsorBgImg"
app:layout_constraintBottom_toBottomOf="@+id/giftSponsorBgImg"
app:layout_constraintStart_toEndOf="@+id/gift_itle"
app:riv_oval="true" />
<com.yunbao.common.views.weight.MarqueeTextView
android:id="@+id/naming_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="4dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="#FFFFFFFF"
app:layout_constraintTop_toTopOf="@+id/giftSponsorBgImg"
app:layout_constraintBottom_toBottomOf="@+id/giftSponsorBgImg"
app:layout_constraintStart_toEndOf="@+id/naming_avatar"
app:layout_constraintEnd_toEndOf="@+id/giftSponsorBgImg"
android:textSize="12sp" />
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="giftSponsorBgImg,gift_itle,naming_avatar,naming_name"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -64,8 +64,6 @@ public class LiveGiftFragment extends BaseFragment {
if (giftJson.size() % GIFT_COUNT > 0) {
pageCount++;
}
}
@Override