feat:完善礼物面板底部UI调整
feat:初步完成解锁信息条目UI部分
This commit is contained in:
@@ -64,8 +64,8 @@ public class GiftInfoVm extends BaseItem<GiftInfo> {
|
||||
super(context, data);
|
||||
this.isSelect.set(select);
|
||||
if (data.getConsumeType() == GiftInfo.CONSUME_TYPE_GOLD) {
|
||||
radishDrawable = context.getResources().getDrawable(R.drawable.gift_dialog_ic_gold);
|
||||
radishDrawableSelected = context.getResources().getDrawable(R.drawable.gift_dialog_ic_gold);
|
||||
radishDrawable = context.getResources().getDrawable(R.drawable.gift_dialog_ic_diamond);
|
||||
radishDrawableSelected = context.getResources().getDrawable(R.drawable.gift_dialog_ic_diamond);
|
||||
} else {
|
||||
radishDrawable = context.getResources().getDrawable(R.drawable.icon_radish_transparent);
|
||||
radishDrawableSelected = context.getResources().getDrawable(R.drawable.icon_radish_transparent_selected);
|
||||
|
@@ -217,6 +217,8 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
private AppCompatTextView tvNum;
|
||||
private SuperTextView tvPrivilegeGive;
|
||||
private Group groupPrivilege;
|
||||
private RecyclerView rvLock;
|
||||
private View layoutLock;
|
||||
|
||||
private int mPrivilegePosition = 0;
|
||||
|
||||
@@ -432,7 +434,8 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
giftNumLayout = findViewById(R.id.gift_number_layout);
|
||||
giftNumLayout.setOnClickListener(this);
|
||||
List<GiftTab> tabInfoList = new ArrayList<>();
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_NORMAL, "礼物", "礼物"));
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_NORMAL, "普通", "普通"));
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_INTEREST, "趣味", "趣味", true));
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_LUCKY, "幸运", "幸运"));
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_NOBLE, "贵族", "贵族"));
|
||||
tabInfoList.add(new GiftTab(GiftIndicator.TYPE_WEEK, "星座礼物", "星座礼物"));
|
||||
@@ -446,8 +449,8 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
giftIndicator.initTab(
|
||||
tabInfoList,
|
||||
true,
|
||||
context.getResources().getColor(R.color.color_bdbfd0),
|
||||
context.getResources().getColor(R.color.color_ffe710)
|
||||
context.getResources().getColor(R.color.color_CED1DB),
|
||||
context.getResources().getColor(R.color.color_FFDA24)
|
||||
);
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
giftIndicator.addClick()
|
||||
@@ -532,6 +535,9 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
case GiftType.GIFT_TYPE_WEEK_STAR:
|
||||
indicatorType = GiftIndicator.TYPE_WEEK;
|
||||
break;
|
||||
case GiftType.GIFT_TYPE_INTEREST:
|
||||
indicatorType = GiftIndicator.TYPE_INTEREST;
|
||||
break;
|
||||
}
|
||||
}
|
||||
showGiftTab(indicatorType, giftInfo);
|
||||
@@ -877,6 +883,10 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
privilegeView.setAdapter(baseQuickAdapter);
|
||||
}
|
||||
|
||||
private void updateLockTips() {
|
||||
|
||||
}
|
||||
|
||||
private void updateLuckyBagIntro() {
|
||||
if (luckyMsgDisposable != null) luckyMsgDisposable.dispose();
|
||||
if (currentGiftInfo == null || currentGiftInfo.getGiftType() != GiftType.GIFT_TYPE_LUCKY) {
|
||||
@@ -1516,6 +1526,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
giftIndicator.showPosition(GiftIndicator.TYPE_WEEK);
|
||||
giftIndicator.showPosition(GiftIndicator.TYPE_NORMAL);
|
||||
giftIndicator.showPosition(GiftIndicator.TYPE_PRIVILEGE);
|
||||
giftIndicator.showPosition(GiftIndicator.TYPE_INTEREST);
|
||||
if (AvRoomDataManager.get().isSingleRoom()) {
|
||||
giftIndicator.showPosition(GiftIndicator.TYPE_SING_ROOM);
|
||||
} else {
|
||||
@@ -1545,6 +1556,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
giftIndicator.hidePosition(GiftIndicator.TYPE_NORMAL);
|
||||
giftIndicator.hidePosition(GiftIndicator.TYPE_SING_ROOM);
|
||||
giftIndicator.hidePosition(GiftIndicator.TYPE_PRIVILEGE);
|
||||
giftIndicator.hidePosition(GiftIndicator.TYPE_INTEREST);
|
||||
|
||||
giftIndicator.setPosition(GiftIndicator.TYPE_DRAW_GIFT);
|
||||
updateGiftView(giftIndicator.getCurrrentType());
|
||||
@@ -1569,6 +1581,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
case GiftIndicator.TYPE_LUCKY:
|
||||
case GiftIndicator.TYPE_NOBLE:
|
||||
case GiftIndicator.TYPE_WEEK:
|
||||
case GiftIndicator.TYPE_INTEREST:
|
||||
String roomUid = null;
|
||||
if (isInRoom) {
|
||||
if (AvRoomDataManager.get().getRoomUid() > 0) {
|
||||
|
@@ -0,0 +1,21 @@
|
||||
package com.nnbc123.app.ui.widget
|
||||
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity
|
||||
import com.nnbc123.app.R
|
||||
|
||||
/**
|
||||
* Created by Max on 2024/1/25 19:41
|
||||
* Desc:
|
||||
**/
|
||||
class GiftLockInfoAdapter :
|
||||
BaseMultiItemQuickAdapter<MultiItemEntity, BaseViewHolder>(emptyList()) {
|
||||
init {
|
||||
addItemType(0, R.layout.gift_dialog_lock_item_basics)
|
||||
addItemType(1, R.layout.gift_dialog_lock_item_child)
|
||||
}
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: MultiItemEntity?) {
|
||||
}
|
||||
}
|
@@ -80,7 +80,11 @@ public class GiftIndicator extends LinearLayout {
|
||||
*/
|
||||
public static final int TYPE_PRIVILEGE = 8;
|
||||
|
||||
private Map<String, String> map = new HashMap<>();
|
||||
/**
|
||||
* 趣味
|
||||
*/
|
||||
public static final int TYPE_INTEREST = 9;
|
||||
|
||||
private List<GiftTab> tabList = new ArrayList<>();
|
||||
private int currrentType = TYPE_NORMAL;
|
||||
|
||||
@@ -143,6 +147,13 @@ public class GiftIndicator extends LinearLayout {
|
||||
index.getItemView().setOnClickListener(v -> {
|
||||
setPosition(index.getType());
|
||||
emitter.onNext(index.getType());
|
||||
if (index.isNeedNewTips()) {
|
||||
ImageView imageView = index.getItemView().findViewById(R.id.iv_new_tag);
|
||||
if (imageView.getVisibility() == VISIBLE) {
|
||||
imageView.setVisibility(GONE);
|
||||
DemoCache.saveNewGiftTypeTip(index.getType(), false);
|
||||
}
|
||||
}
|
||||
if (index.getType() == TYPE_PENALTY) {
|
||||
ImageView imageView = index.getItemView().findViewById(R.id.iv_new_tag);
|
||||
if (imageView.getVisibility() == VISIBLE) {
|
||||
@@ -186,6 +197,12 @@ public class GiftIndicator extends LinearLayout {
|
||||
for (GiftTab tab : tabList) {
|
||||
if (tab.getType() == type) {
|
||||
tab.getItemView().setVisibility(VISIBLE);
|
||||
if (tab.isNeedNewTips()) {
|
||||
if (DemoCache.readNewGiftTypeTip(tab.getType())) {
|
||||
ImageView imageView = tab.getItemView().findViewById(R.id.iv_new_tag);
|
||||
imageView.setVisibility(VISIBLE);
|
||||
}
|
||||
}
|
||||
if (type == TYPE_PENALTY) {
|
||||
if (DemoCache.readNewGiftTypeTip()) {
|
||||
ImageView imageView = tab.getItemView().findViewById(R.id.iv_new_tag);
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 280 B |
Binary file not shown.
Before Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/drawable-xxhdpi/gift_dialog_ic_diamond_14.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/gift_dialog_ic_diamond_14.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
@@ -2,7 +2,7 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFE710" />
|
||||
<solid android:color="#FFDA24" />
|
||||
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="100dp" android:topLeftRadius="0dp" android:topRightRadius="100dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
@@ -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="#14FFFFFF" />
|
||||
|
||||
<corners android:radius="4dp" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FFDA24" />
|
||||
</shape>
|
@@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="8dp"
|
||||
android:height="8dp"
|
||||
android:viewportWidth="8"
|
||||
android:viewportHeight="8">
|
||||
<path
|
||||
android:pathData="M6.512,4.3904L2.8123,7.3501C2.5967,7.5226 2.2821,7.4877 2.1096,7.272C2.0386,7.1834 2,7.0732 2,6.9597L2,1.0403C2,0.7642 2.2239,0.5403 2.5,0.5403C2.6135,0.5403 2.7237,0.579 2.8123,0.6499L6.512,3.6096C6.7276,3.7821 6.7625,4.0967 6.59,4.3123C6.567,4.3412 6.5408,4.3674 6.512,4.3904Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
</vector>
|
12
app/src/main/res/drawable/gift_dialog_ic_arrow_white_up.xml
Normal file
12
app/src/main/res/drawable/gift_dialog_ic_arrow_white_up.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="10dp"
|
||||
android:height="10dp"
|
||||
android:viewportWidth="10"
|
||||
android:viewportHeight="10">
|
||||
<path
|
||||
android:pathData="M5.384,2.461L9.317,7.18C9.493,7.392 9.465,7.707 9.253,7.884C9.163,7.959 9.049,8 8.932,8L1.068,8C0.791,8 0.568,7.776 0.568,7.5C0.568,7.383 0.609,7.27 0.683,7.18L4.616,2.461C4.793,2.249 5.108,2.22 5.32,2.397C5.343,2.416 5.365,2.438 5.384,2.461Z"
|
||||
android:strokeWidth="1"
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="evenOdd"
|
||||
android:strokeColor="#00000000"/>
|
||||
</vector>
|
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 定义轨道的背景 -->
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#696D7A" />
|
||||
<corners android:radius="3dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- 定义轨道上已完成部分的样式 -->
|
||||
<item android:id="@android:id/progress">
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFDA24" />
|
||||
<corners android:radius="3dp" />
|
||||
</shape>
|
||||
</scale>
|
||||
</item>
|
||||
</layer-list>
|
6
app/src/main/res/drawable/shape_14ffffff_4dp.xml
Normal file
6
app/src/main/res/drawable/shape_14ffffff_4dp.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="4dp" />
|
||||
<solid android:color="#14FFFFFF" />
|
||||
</shape>
|
@@ -2,12 +2,12 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#FFE710"
|
||||
android:color="#FFDA24"
|
||||
/>
|
||||
<solid
|
||||
android:color="@color/transparent"
|
||||
/>
|
||||
<corners
|
||||
android:radius="50dp"
|
||||
android:radius="16dp"
|
||||
/>
|
||||
</shape>
|
@@ -6,6 +6,40 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/layout_lock"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginHorizontal="6dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/transparent"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="0px"
|
||||
app:cardMaxElevation="0px"
|
||||
app:layout_constraintBottom_toTopOf="@id/ll_dialog_bottom_gift"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.github.mmin18.widget.RealtimeBlurView
|
||||
android:id="@+id/blur_view_lock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:realtimeBlurRadius="25dp"
|
||||
app:realtimeDownsampleFactor="4"
|
||||
app:realtimeOverlayColor="#e0161722" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView_lock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_lucky_desc"
|
||||
android:layout_width="0dp"
|
||||
@@ -381,9 +415,8 @@
|
||||
<com.nnbc123.app.ui.widget.magicindicator.GiftIndicator
|
||||
android:id="@+id/gift_indicator"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -394,7 +427,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_gifts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="261dp"
|
||||
android:layout_height="222dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -534,7 +567,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_recharge"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_height="40dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_gift_message">
|
||||
@@ -542,9 +575,9 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_gold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginStart="13dp"
|
||||
android:background="@drawable/shape_black_solid_round"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="9dp"
|
||||
@@ -554,8 +587,8 @@
|
||||
android:id="@+id/tv_text_gold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/ic_gift_diamond"
|
||||
android:drawablePadding="3dp"
|
||||
android:drawableStart="@drawable/gift_dialog_ic_diamond_14"
|
||||
android:drawablePadding="2dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:text="0"
|
||||
@@ -564,22 +597,21 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tv_recharge"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginStart="7dp"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_arrow_recharge_white" />
|
||||
android:src="@drawable/gift_dialog_ic_arrow_white_right" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/send_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginRight="13dp"
|
||||
android:background="@drawable/shape_room_bg_send"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -605,7 +637,7 @@
|
||||
android:layout_width="@dimen/dp_10"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:layout_marginStart="10dp"
|
||||
android:src="@drawable/icon_room_send_arrow_white" />
|
||||
android:src="@drawable/gift_dialog_ic_arrow_white_up" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -616,7 +648,7 @@
|
||||
android:background="@drawable/bg_magic_dialog_button_send"
|
||||
android:text="赠送"
|
||||
android:textColor="@color/text_normal_282828"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
android:textSize="13dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -625,7 +657,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cs_privilege"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="40dp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@@ -325,6 +325,7 @@
|
||||
android:layout_width="@dimen/dp_10"
|
||||
android:layout_height="@dimen/dp_10"
|
||||
android:layout_marginStart="10dp"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/icon_room_send_arrow" />
|
||||
|
||||
</LinearLayout>
|
||||
|
60
app/src/main/res/layout/gift_dialog_lock_item_basics.xml
Normal file
60
app/src/main/res/layout/gift_dialog_lock_item_basics.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/shape_14ffffff_4dp"
|
||||
android:paddingHorizontal="3dp"
|
||||
tools:background="@color/black">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/default_cover" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_amount"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_cover"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_cover"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="#CED1DB"
|
||||
android:textSize="9dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_cover"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_unit"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||
tools:text="100" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_unit"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:src="@drawable/gift_dialog_ic_diamond"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_amount"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_name"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_amount" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
62
app/src/main/res/layout/gift_dialog_lock_item_child.xml
Normal file
62
app/src/main/res/layout/gift_dialog_lock_item_child.xml
Normal file
@@ -0,0 +1,62 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/shape_14ffffff_4dp"
|
||||
android:paddingHorizontal="3dp"
|
||||
tools:background="@color/black">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cover"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/default_cover" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_count"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_cover"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_cover"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="#CED1DB"
|
||||
android:textSize="9dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_cover"
|
||||
app:layout_constraintStart_toEndOf="@id/progress_bar"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||
tools:text="1/5" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="6dp"
|
||||
android:max="100"
|
||||
android:progressDrawable="@drawable/gift_dialog_lock_progress_drawable"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_count"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_name"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_count"
|
||||
tools:progress="20" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -5,8 +5,8 @@
|
||||
android:layout_height="26dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/dp_7"
|
||||
android:paddingRight="@dimen/dp_7">
|
||||
android:paddingLeft="@dimen/dp_8"
|
||||
android:paddingRight="@dimen/dp_8">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
|
@@ -381,6 +381,14 @@ public class DemoCache {
|
||||
return SettingsPref.instance().getBoolean(KEY_NEW_GIFT_TYPE_TIP, true);
|
||||
}
|
||||
|
||||
public static void saveNewGiftTypeTip(int type,boolean value) {
|
||||
SettingsPref.instance().putBoolean(KEY_NEW_GIFT_TYPE_TIP + "_" + type, value);
|
||||
}
|
||||
|
||||
public static boolean readNewGiftTypeTip(int type) {
|
||||
return SettingsPref.instance().getBoolean(KEY_NEW_GIFT_TYPE_TIP + "_" + type, true);
|
||||
}
|
||||
|
||||
public static void saveNewGiftTypeTipIndicator(boolean value) {
|
||||
SettingsPref.instance().putBoolean(KEY_NEW_GIFT_TYPE_TIP_INDICATOR, value);
|
||||
}
|
||||
|
@@ -13,10 +13,19 @@ public class GiftTab {
|
||||
this.selectedTitle = selectedTitle;
|
||||
}
|
||||
|
||||
public GiftTab(int type, String unSelectedTitle, String selectedTitle, boolean needNewTips) {
|
||||
this.type = type;
|
||||
this.unSelectedTitle = unSelectedTitle;
|
||||
this.selectedTitle = selectedTitle;
|
||||
this.needNewTips = needNewTips;
|
||||
}
|
||||
|
||||
private int type;
|
||||
private String selectedTitle;
|
||||
private String unSelectedTitle;
|
||||
private View itemView;
|
||||
// 是否需要提示:“new”
|
||||
private boolean needNewTips;
|
||||
|
||||
//<editor-fold defaultstate="collapsed" desc="delombok">
|
||||
@SuppressWarnings("all")
|
||||
@@ -59,6 +68,14 @@ public class GiftTab {
|
||||
this.itemView = itemView;
|
||||
}
|
||||
|
||||
public boolean isNeedNewTips() {
|
||||
return needNewTips;
|
||||
}
|
||||
|
||||
public void setNeedNewTips(boolean needNewTips) {
|
||||
this.needNewTips = needNewTips;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public boolean equals(final Object o) {
|
||||
|
@@ -42,4 +42,6 @@ public class GiftType {
|
||||
public static final int GIFT_TYPE_SINGLE_ROOM = 11;
|
||||
|
||||
public static final int GIFT_TYPE_PENALTY = 12;
|
||||
|
||||
public static final int GIFT_TYPE_INTEREST = 14;
|
||||
}
|
||||
|
Reference in New Issue
Block a user