feat:寻爱之旅玩法改版-》欢乐砸蛋
BIN
app/src/main/assets/svga/bubble_tran_bg.svga
Normal file
BIN
app/src/main/assets/svga/gold_box_bg.svga
Normal file
BIN
app/src/main/assets/svga/smash_eggs_open.svga
Normal file
@@ -12,6 +12,9 @@ import com.chwl.app.room_chat.activity.RoomMsgActivity
|
||||
import com.chwl.app.support.float.FloatWindowEngine
|
||||
import com.chwl.app.support.float.SimpleFloatQueue
|
||||
import com.chwl.app.support.float.SimpleFloatWindow
|
||||
import com.chwl.app.treasure_box.activity.BoxRankingActivity
|
||||
import com.chwl.app.treasure_box.activity.TreasureBoxActivity
|
||||
import com.chwl.app.treasure_box.activity.TreasureBoxHonourActivity
|
||||
import com.chwl.app.ui.login.AddUserInfoActivity
|
||||
import com.chwl.app.ui.login.LoginCodeActivity
|
||||
import com.chwl.app.ui.login.LoginPhoneActivity
|
||||
@@ -51,11 +54,12 @@ object GlobalNotifyManager : Observer<BroadcastMessage>, ILog {
|
||||
NimMiddleActivity::class.java,
|
||||
// 房间页面单独处理
|
||||
AVRoomActivity::class.java,
|
||||
// 该Activity用了透明主题且顶部区域还能看到房间页面,那就在房间页面展示飘屏即可
|
||||
// TreasureBoxActivity::class.java,
|
||||
// 该Activity用了透明主题且顶部区域还能看到房间页面,那就在房间页面展示飘屏即可
|
||||
// 房间内玩法(该Activity用了透明主题且顶部区域还能看到房间页面,那就在房间页面展示飘屏即可)
|
||||
TreasureBoxActivity::class.java,
|
||||
BoxRankingActivity::class.java,
|
||||
TreasureBoxHonourActivity::class.java,
|
||||
// 房间内私聊(该Activity用了透明主题且顶部区域还能看到房间页面,那就在房间页面展示飘屏即可)
|
||||
NimRoomP2PMessageActivity::class.java,
|
||||
// 该Activity用了透明主题且顶部区域还能看到房间页面,那就在房间页面展示飘屏即可
|
||||
RoomMsgActivity::class.java
|
||||
)
|
||||
|
||||
|
@@ -2,7 +2,6 @@ package com.chwl.app.notify
|
||||
|
||||
import android.content.Context
|
||||
import com.chwl.app.notify.views.FindLoveImageNotify
|
||||
import com.chwl.app.notify.views.FindLoveSvgaNotify
|
||||
import com.chwl.app.notify.views.TemplateImageNotify
|
||||
import com.chwl.app.notify.views.TemplateSvgaNotify
|
||||
import com.chwl.app.notify.views.GiftNotify
|
||||
@@ -39,9 +38,9 @@ class NotifyAdapter : FloatViewAdapter {
|
||||
// 寻爱
|
||||
is RoomBoxPrizeAttachment -> {
|
||||
if (item.second == CustomAttachment.CUSTOM_MSG_SUB_BOX_ALL_ROOM_NOTIFY_BY_SVGA) {
|
||||
return FindLoveSvgaNotify(context)
|
||||
return FindLoveImageNotify(context, true)
|
||||
} else if (item.second == CustomAttachment.CUSTOM_MSG_SUB_BOX_ALL_ROOM_NOTIFY) {
|
||||
return FindLoveImageNotify(context)
|
||||
return FindLoveImageNotify(context, false)
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
|
@@ -11,10 +11,10 @@ import com.chwl.app.support.float.BaseFloatView
|
||||
import com.chwl.app.utils.SpannableBuilder
|
||||
import com.chwl.core.im.custom.bean.RoomBoxPrizeAttachment
|
||||
import com.chwl.core.utils.extension.subAndReplaceDot
|
||||
import com.chwl.library.utils.ResUtil
|
||||
import com.example.lib_utils.UiUtils
|
||||
|
||||
|
||||
class FindLoveImageNotify(context: Context) : BaseFloatView(context) {
|
||||
class FindLoveImageNotify(context: Context, val isHeightLevel: Boolean) : BaseFloatView(context) {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_template_notify_image, this, true)
|
||||
@@ -31,28 +31,31 @@ class FindLoveImageNotify(context: Context) : BaseFloatView(context) {
|
||||
textView.setTextColor(Color.WHITE)
|
||||
val text = SpannableBuilder()
|
||||
.append(
|
||||
ResUtil.getString(R.string.avroom_widget_roomeffectview_08),
|
||||
"厲害了!",
|
||||
ForegroundColorSpan(Color.WHITE)
|
||||
)
|
||||
.append(
|
||||
data.nick.subAndReplaceDot(8),
|
||||
ForegroundColorSpan(resources.getColor(R.color.notice_nick))
|
||||
ForegroundColorSpan(resources.getColor(R.color.color_FFE44E))
|
||||
)
|
||||
.append(
|
||||
ResUtil.getString(R.string.treasure_in_find_love) + ResUtil.getString(
|
||||
R.string.avroom_widget_roomeffectview_09
|
||||
), ForegroundColorSpan(Color.WHITE)
|
||||
"通過歡樂砸蛋獲得\n", ForegroundColorSpan(Color.WHITE)
|
||||
)
|
||||
.append(
|
||||
data.prizeName,
|
||||
ForegroundColorSpan(resources.getColor(R.color.notice_nick))
|
||||
ForegroundColorSpan(resources.getColor(R.color.color_FFE44E))
|
||||
)
|
||||
if (data.prizeNum > 1) {
|
||||
text.append("x" + data.prizeNum, ForegroundColorSpan(Color.WHITE))
|
||||
}
|
||||
textView.text = text.build()
|
||||
textView.setPadding(0, UiUtils.dip2px(2f), 0, 0)
|
||||
val bgView = rootView.findViewById<ImageView>(R.id.iv_bg)
|
||||
bgView.setImageResource(R.drawable.bg_box_notice)
|
||||
if (isHeightLevel) {
|
||||
bgView.setImageResource(R.drawable.smash_eggs_notity_bg_5)
|
||||
} else {
|
||||
bgView.setImageResource(R.drawable.smash_eggs_notity_bg_4)
|
||||
}
|
||||
startEnterAnim()
|
||||
startDelayRemove()
|
||||
}
|
||||
|
@@ -1,76 +0,0 @@
|
||||
package com.chwl.app.notify.views
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.TextView
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.common.svga.SimpleSvgaCallback
|
||||
import com.chwl.app.support.float.BaseFloatView
|
||||
import com.chwl.app.utils.SpannableBuilder
|
||||
import com.chwl.core.im.custom.bean.RoomBoxPrizeAttachment
|
||||
import com.chwl.library.utils.ResUtil
|
||||
import com.chwl.library.utils.StringUtils
|
||||
import com.opensource.svgaplayer.SVGADrawable
|
||||
import com.opensource.svgaplayer.SVGAImageView
|
||||
import com.opensource.svgaplayer.SVGAParser
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity
|
||||
|
||||
|
||||
class FindLoveSvgaNotify(context: Context) : BaseFloatView(context) {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_find_love_notify_svga, this, true)
|
||||
}
|
||||
|
||||
override fun onBind(item: Any) {
|
||||
val data = item as? RoomBoxPrizeAttachment
|
||||
if (data == null) {
|
||||
requestRemoveSelf()
|
||||
return
|
||||
}
|
||||
val svgaView = rootView.findViewById<SVGAImageView>(R.id.iv_bg)
|
||||
val textView = rootView.findViewById<TextView>(R.id.tv_text)
|
||||
val text = SpannableBuilder()
|
||||
.append(
|
||||
ResUtil.getString(R.string.avroom_widget_roomeffectview_011),
|
||||
ForegroundColorSpan(Color.WHITE)
|
||||
)
|
||||
.append(
|
||||
StringUtils.abbreviate(data.nick, 8) + " ",
|
||||
ForegroundColorSpan(resources.getColor(R.color.notice_nick))
|
||||
)
|
||||
.append(
|
||||
ResUtil.getString(R.string.treasure_in_find_love) + ResUtil.getString(
|
||||
R.string.avroom_widget_roomeffectview_012
|
||||
), ForegroundColorSpan(Color.WHITE)
|
||||
)
|
||||
.append(
|
||||
data.prizeName,
|
||||
ForegroundColorSpan(resources.getColor(R.color.notice_nick))
|
||||
)
|
||||
if (data.prizeNum > 1) {
|
||||
text.append("x" + data.prizeNum, ForegroundColorSpan(Color.WHITE))
|
||||
}
|
||||
svgaView.callback = object : SimpleSvgaCallback() {
|
||||
override fun onFinished() {
|
||||
startDelayRemove(0)
|
||||
}
|
||||
}
|
||||
SVGAParser.shareParser()
|
||||
.decodeFromAssets("svga/box_notify.svga", object : SVGAParser.ParseCompletion {
|
||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
this@FindLoveSvgaNotify.startEnterAnim()
|
||||
val drawable = SVGADrawable(videoItem)
|
||||
svgaView.setImageDrawable(drawable)
|
||||
svgaView.stepToFrame(0, true)
|
||||
textView.text = text.build()
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
requestRemoveSelf()
|
||||
}
|
||||
}, null)
|
||||
}
|
||||
}
|
BIN
app/src/main/res/drawable-xxhdpi/smash_eggs_notity_bg_4.png
Normal file
After Width: | Height: | Size: 239 KiB |
BIN
app/src/main/res/drawable-xxhdpi/smash_eggs_notity_bg_5.png
Normal file
After Width: | Height: | Size: 266 KiB |
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/bg_683fad_10" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/bg_8651e0" />
|
||||
<item android:drawable="@drawable/base_shape_33ffffff_9dp" android:state_selected="true" />
|
||||
<item android:drawable="@color/transparent" />
|
||||
|
||||
</selector>
|
||||
|
6
app/src/main/res/drawable/shape_7821e8_15dp.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#7821E8" />
|
||||
<corners android:radius="15dp" />
|
||||
</shape>
|
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_80"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/dp_0"
|
||||
android:paddingEnd="@dimen/dp_15">
|
||||
@@ -12,14 +12,14 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0.3"
|
||||
android:layout_weight="0.4"
|
||||
android:paddingStart="@dimen/dp_8"
|
||||
android:paddingEnd="@dimen/dp_0">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_position"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
@@ -29,7 +29,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
tools:text="100" />
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
|
||||
<com.chwl.app.ui.widget.NobleAvatarView
|
||||
android:id="@+id/noble_avatar_view"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="@dimen/dp_58"
|
||||
android:layout_height="@dimen/dp_58"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
@@ -71,8 +71,8 @@
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="end"
|
||||
android:textColor="@color/color_F8FF7B"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="1236843"
|
||||
app:drawableEndCompat="@drawable/treasure_box_diamond" />
|
||||
app:drawableEndCompat="@drawable/icon_diamond" />
|
||||
|
||||
</LinearLayout>
|
@@ -12,7 +12,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/bg_radish_notice" />
|
||||
tools:src="@drawable/smash_eggs_notity_bg_4" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_text"
|
||||
@@ -26,6 +26,7 @@
|
||||
android:lineSpacingMultiplier="0.8"
|
||||
android:maxLines="2"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_bg"
|
||||
|
@@ -50,6 +50,7 @@
|
||||
<color name="white_tran_10">#19FFFFFF</color>
|
||||
<color name="white_tran_20">#33FFFFFF</color>
|
||||
<color name="white_tran_40">#66FFFFFF</color>
|
||||
<color name="white_tran_60">#99FFFFFF</color>
|
||||
|
||||
<color name="white_transparent_12">#1EFFFFFF</color>
|
||||
<color name="white_transparent_14">#23FFFFFF</color>
|
||||
@@ -722,5 +723,6 @@
|
||||
<color name="color_D667FF">#FFD667FF</color>
|
||||
<color name="color_57CDFF">#FF57CDFF</color>
|
||||
<color name="color_FFF45E">#FFF45E</color>
|
||||
<color name="color_FFE44E">#FFE44E</color>
|
||||
|
||||
</resources>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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:id="@+id/root_view"
|
||||
@@ -7,46 +7,75 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:background="@color/color_666666">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="360dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/bg_treasure_box_20"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/smash_eggs_rank_bg"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="375:552">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_tab"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:background="@drawable/smash_eggs_rank_bg_tab"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2"
|
||||
app:layout_constraintDimensionRatio="225:40"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.6">
|
||||
|
||||
<com.flyco.tablayout.SlidingTabLayout
|
||||
android:id="@+id/view_indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
app:tl_indicator_color="@color/color_white"
|
||||
app:tl_indicator_corner_radius="2dp"
|
||||
app:tl_indicator_height="@dimen/dp_4"
|
||||
app:tl_indicator_width="@dimen/dp_13"
|
||||
app:tl_tab_space_equal="true"
|
||||
app:tl_textSelectColor="@color/color_white"
|
||||
app:tl_textUnselectColor="@color/white_transparent_50"
|
||||
app:tl_textsize="@dimen/sp_16" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_today"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:src="@drawable/ic_refresh" />
|
||||
android:layout_weight="1"
|
||||
android:autoSizeMaxTextSize="@dimen/dp_15"
|
||||
android:autoSizeMinTextSize="@dimen/dp_8"
|
||||
android:autoSizeStepGranularity="1sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:background="@drawable/smash_eggs_rank_bg_tab_selected_left"
|
||||
android:gravity="center"
|
||||
android:text="@string/treasure_box_activity_boxrankingactivity_01"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_15"
|
||||
app:autoSizeMaxTextSize="@dimen/dp_15"
|
||||
app:autoSizeMinTextSize="@dimen/dp_8"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform" />
|
||||
|
||||
</FrameLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_tab_yesterday"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:autoSizeMaxTextSize="@dimen/dp_15"
|
||||
android:autoSizeMinTextSize="@dimen/dp_8"
|
||||
android:autoSizeStepGranularity="1sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:text="@string/treasure_box_activity_boxrankingactivity_02"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_15"
|
||||
app:autoSizeMaxTextSize="@dimen/dp_15"
|
||||
app:autoSizeMinTextSize="@dimen/dp_8"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
tools:background="@drawable/smash_eggs_rank_bg_tab_selected_right" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_tab" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -6,35 +6,30 @@ import android.content.Intent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.avroom.adapter.CommonVPAdapter;
|
||||
import com.chwl.app.base.BaseViewBindingActivity;
|
||||
import com.chwl.app.common.ViewPagerAdapter;
|
||||
import com.chwl.app.databinding.ActivityRoomBoxRankingBinding;
|
||||
import com.chwl.app.decoration.view.widgets.CarMagicIndicator;
|
||||
import com.chwl.app.room_chat.event.ClickRootViewEvent;
|
||||
import com.chwl.app.treasure_box.fragment.BoxRankingFragment;
|
||||
import com.chwl.core.home.bean.TabInfo;
|
||||
import com.chwl.core.manager.IMNetEaseManager;
|
||||
import com.chwl.core.manager.RoomEvent;
|
||||
import com.chwl.core.room.treasure_box.event.RefreshBoxRankingEvent;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BoxRankingActivity extends BaseViewBindingActivity<ActivityRoomBoxRankingBinding>
|
||||
implements CarMagicIndicator.OnItemSelectListener, View.OnClickListener {
|
||||
|
||||
private final String[] titles = {ResUtil.getString(R.string.treasure_box_activity_boxrankingactivity_01), ResUtil.getString(R.string.treasure_box_activity_boxrankingactivity_02)};
|
||||
public static final int TYPE_TODAY = 1;//今日
|
||||
public static final int TYPE_YESTERDAY = 2;//今日
|
||||
|
||||
|
||||
public static void start(Context context) {
|
||||
Intent starter = new Intent(context, BoxRankingActivity.class);
|
||||
context.startActivity(starter);
|
||||
@@ -45,21 +40,48 @@ public class BoxRankingActivity extends BaseViewBindingActivity<ActivityRoomBoxR
|
||||
EventBus.getDefault().register(this);
|
||||
|
||||
binding.rootView.setOnClickListener(this);
|
||||
|
||||
List<TabInfo> tabInfoList = new ArrayList<>(2);
|
||||
for (int i = 0; i < titles.length; i++) {
|
||||
tabInfoList.add(new TabInfo(i, titles[i]));
|
||||
}
|
||||
binding.viewpager.setOffscreenPageLimit(2);
|
||||
binding.viewpager.setAdapter(new ViewPagerAdapter(getSupportFragmentManager(), getFragment(), titles));
|
||||
binding.viewIndicator.setViewPager(binding.viewpager, titles, this, getFragment());
|
||||
binding.viewpager.setAdapter(new CommonVPAdapter(getSupportFragmentManager(), getLifecycle(), getFragment()));
|
||||
binding.viewpager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
super.onPageScrolled(position, positionOffset, positionOffsetPixels);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
super.onPageSelected(position);
|
||||
onTabChanged(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
super.onPageScrollStateChanged(state);
|
||||
}
|
||||
});
|
||||
binding.tvTabToday.setOnClickListener(v -> {
|
||||
binding.viewpager.setCurrentItem(0);
|
||||
onTabChanged(0);
|
||||
});
|
||||
binding.tvTabYesterday.setOnClickListener(v -> {
|
||||
binding.viewpager.setCurrentItem(1);
|
||||
onTabChanged(1);
|
||||
});
|
||||
|
||||
IMNetEaseManager.get().getChatRoomEventObservable()
|
||||
.compose(bindToLifecycle())
|
||||
.filter(roomEvent -> roomEvent.getEvent() == RoomEvent.KICK_OUT_ROOM)
|
||||
.subscribe(roomEvent -> finish());
|
||||
}
|
||||
|
||||
binding.ivRefresh.setOnClickListener(v -> EventBus.getDefault().post(new RefreshBoxRankingEvent()));
|
||||
private void onTabChanged(int tabPosition) {
|
||||
if (tabPosition == 0) {
|
||||
binding.tvTabToday.setBackgroundResource(R.drawable.smash_eggs_rank_bg_tab_selected_left);
|
||||
binding.tvTabYesterday.setBackground(null);
|
||||
} else {
|
||||
binding.tvTabToday.setBackground(null);
|
||||
binding.tvTabYesterday.setBackgroundResource(R.drawable.smash_eggs_rank_bg_tab_selected_right);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -87,7 +109,7 @@ public class BoxRankingActivity extends BaseViewBindingActivity<ActivityRoomBoxR
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if(view.getId() == R.id.root_view){
|
||||
if (view.getId() == R.id.root_view) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
@@ -1,34 +1,31 @@
|
||||
package com.chwl.app.treasure_box.activity;
|
||||
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_BOX;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_GIFT;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_ALL;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_NOTIFY;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_SEA;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_LUCKY_SEA_GIFT_SERVER_ALL;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_BOX_ALL_ROOM_NOTIFY_BY_SVGA;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_TEMPLATE_NOTIFY;
|
||||
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_TEMPLATE_NOTIFY_ALL;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
@@ -50,12 +47,9 @@ import com.chwl.core.treasure_box.bean.PrizeNewInfo;
|
||||
import com.chwl.core.treasure_box.bean.UserTicketInfo;
|
||||
import com.chwl.core.treasure_box.model.BoxModel;
|
||||
import com.chwl.core.DemoCache;
|
||||
import com.chwl.core.auth.AuthModel;
|
||||
import com.chwl.core.bean.BaseProtocol;
|
||||
import com.chwl.core.exception.FailReasonException;
|
||||
import com.chwl.core.gift.bean.LuckyBagNoticeInfo;
|
||||
import com.chwl.core.im.custom.bean.RoomBoxPrizeAttachment;
|
||||
import com.chwl.core.im.custom.bean.RoomBoxPrizeInfo;
|
||||
import com.chwl.core.im.custom.bean.RoomLuckySeaAttachment;
|
||||
import com.chwl.core.im.custom.bean.RoomLuckySeaMsgBean;
|
||||
import com.chwl.core.im.custom.bean.RoomReceivedLuckyGiftAttachment;
|
||||
@@ -65,22 +59,23 @@ import com.chwl.core.manager.AvRoomDataManager;
|
||||
import com.chwl.core.manager.IMNetEaseManager;
|
||||
import com.chwl.core.manager.RoomEvent;
|
||||
import com.chwl.core.pay.PayModel;
|
||||
import com.chwl.core.pay.bean.WalletInfo;
|
||||
import com.chwl.core.room.bean.FindLoveSwitchVo;
|
||||
import com.chwl.library.annatation.ActLayoutRes;
|
||||
import com.chwl.library.common.SpConstants;
|
||||
import com.chwl.library.common.util.SPUtils;
|
||||
import com.chwl.library.utils.FormatUtils;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
import com.chwl.library.utils.SingleToastUtil;
|
||||
import com.chwl.library.utils.TimeUtils;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
@@ -94,8 +89,6 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
private final Runnable removeRunnable = () -> mBinding.llPrizeHint.removeAllViews();
|
||||
private ArrayList<PrizeNewInfo> cacheList = new ArrayList<>();
|
||||
private ArrayList<PrizeNewInfo> hintPrizeCacheList = new ArrayList<>();
|
||||
private ObjectAnimator translationXAnimator;
|
||||
private ObjectAnimator translationYAnimator;
|
||||
private int height;
|
||||
private int sendMessageSwitchLevel;
|
||||
|
||||
@@ -123,25 +116,6 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
@Override
|
||||
protected void init() {
|
||||
mBinding.setClick(this);
|
||||
translationXAnimator = ObjectAnimator.ofFloat(mBinding.ivGiftAnim, "translationX", 0,
|
||||
ScreenUtil.screenWidth / 2f - ScreenUtil.dip2px(15 + 19)).setDuration(100);
|
||||
translationXAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
translationXAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
mBinding.ivGiftAnim.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
mBinding.ivBox.post(() -> {
|
||||
translationYAnimator = ObjectAnimator.ofFloat(mBinding.ivGiftAnim, "translationY", 0,
|
||||
height - (mBinding.ivBox.getBottom() + mBinding.ivBox.getTop()) / 2f - ScreenUtil.dip2px(10 + 19)).setDuration(100);
|
||||
translationYAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
});
|
||||
WalletInfo walletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
if (walletInfo != null) {
|
||||
mBinding.tvDiamondNum.setText(FormatUtils.formatBigInteger(walletInfo.getDiamondNum()));
|
||||
}
|
||||
|
||||
mBinding.view1.setOnClickListener(v -> setBoxPriceSelect(1));
|
||||
mBinding.view2.setOnClickListener(v -> setBoxPriceSelect(2));
|
||||
mBinding.view3.setOnClickListener(v -> setBoxPriceSelect(3));
|
||||
@@ -205,9 +179,22 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
|
||||
loadUserTicket();
|
||||
loadKeyInfo();
|
||||
looperPrize();
|
||||
looperHintPrize();
|
||||
SVGAParser.Companion.shareParser()
|
||||
.decodeFromAssets("svga/smash_eggs_open.svga", new SVGAParser.ParseCompletion() {
|
||||
@Override
|
||||
public void onError() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete(@NonNull SVGAVideoEntity svgaVideoEntity) {
|
||||
SVGADrawable drawable = new SVGADrawable(svgaVideoEntity);
|
||||
mBinding.ivBoxOpen.setImageDrawable(drawable);
|
||||
mBinding.ivBoxOpen.startAnimation();
|
||||
mBinding.ivBoxOpen.stepToFrame(0, false);
|
||||
}
|
||||
}, null);
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
@@ -229,9 +216,9 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
mBinding.view1.setSelected(false);
|
||||
mBinding.view2.setSelected(false);
|
||||
mBinding.view3.setSelected(false);
|
||||
mBinding.tv1.setAlpha(0.4f);
|
||||
mBinding.tv2.setAlpha(0.4f);
|
||||
mBinding.tv3.setAlpha(0.4f);
|
||||
mBinding.tv1.setAlpha(0.6f);
|
||||
mBinding.tv2.setAlpha(0.6f);
|
||||
mBinding.tv3.setAlpha(0.6f);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -245,23 +232,23 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
mBinding.view2.setSelected(false);
|
||||
mBinding.view3.setSelected(false);
|
||||
mBinding.tv1.setAlpha(1f);
|
||||
mBinding.tv2.setAlpha(0.4f);
|
||||
mBinding.tv3.setAlpha(0.4f);
|
||||
mBinding.tv2.setAlpha(0.6f);
|
||||
mBinding.tv3.setAlpha(0.6f);
|
||||
} else if (pos == 2) {
|
||||
mNum = 10;
|
||||
mBinding.view1.setSelected(false);
|
||||
mBinding.view2.setSelected(true);
|
||||
mBinding.view3.setSelected(false);
|
||||
mBinding.tv1.setAlpha(0.4f);
|
||||
mBinding.tv1.setAlpha(0.6f);
|
||||
mBinding.tv2.setAlpha(1f);
|
||||
mBinding.tv3.setAlpha(0.4f);
|
||||
mBinding.tv3.setAlpha(0.6f);
|
||||
} else if (pos == 3) {
|
||||
mNum = 100;
|
||||
mBinding.view1.setSelected(false);
|
||||
mBinding.view2.setSelected(false);
|
||||
mBinding.view3.setSelected(true);
|
||||
mBinding.tv1.setAlpha(0.4f);
|
||||
mBinding.tv2.setAlpha(0.4f);
|
||||
mBinding.tv1.setAlpha(0.6f);
|
||||
mBinding.tv2.setAlpha(0.6f);
|
||||
mBinding.tv3.setAlpha(1f);
|
||||
}
|
||||
}
|
||||
@@ -278,7 +265,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.root_view:
|
||||
case R.id.layout_root:
|
||||
finish();
|
||||
break;
|
||||
case R.id.iv_more:
|
||||
@@ -296,9 +283,8 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
case R.id.iv_box_3:
|
||||
openBox(100);
|
||||
break;
|
||||
case R.id.view_bg:
|
||||
case R.id.iv_title:
|
||||
//do nothing
|
||||
case R.id.iv_box_4:
|
||||
openBox(200);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -361,28 +347,7 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
mBinding.ivBox1.setEnabled(status);
|
||||
mBinding.ivBox2.setEnabled(status);
|
||||
mBinding.ivBox3.setEnabled(status);
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void looperPrize() {
|
||||
Observable.interval(0, 100, TimeUnit.MILLISECONDS)
|
||||
.compose(bindToLifecycle())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.filter(aLong -> cacheList.size() > 0)
|
||||
.subscribe(aLong -> {
|
||||
PrizeNewInfo prizeInfo = cacheList.get(0);
|
||||
String url = prizeInfo.getPicUrl();
|
||||
if (cacheList.size() > 0) cacheList.remove(0);
|
||||
if (!TextUtils.isEmpty(url)) {
|
||||
if (translationXAnimator != null) translationXAnimator.start();
|
||||
if (translationYAnimator != null) translationYAnimator.start();
|
||||
mBinding.ivGiftAnim.setVisibility(View.VISIBLE);
|
||||
mBinding.svgaGiftBg.startAnimation();
|
||||
ImageLoadUtils.loadImage(context, url, mBinding.ivGiftAnim);
|
||||
}
|
||||
}
|
||||
, e -> looperPrize());//出错了继续looper......
|
||||
|
||||
mBinding.ivBox4.setEnabled(status);
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
@@ -425,7 +390,6 @@ public class TreasureBoxActivity extends BaseBindingActivity<ActivityTreasureBox
|
||||
* @param g
|
||||
*/
|
||||
private void setGold(double g) {
|
||||
mBinding.tvDiamondNum.setText(FormatUtils.formatBigInteger(g));
|
||||
PayModel.get().getCurrentWalletInfo().setDiamondNum(g);
|
||||
}
|
||||
|
||||
|
@@ -43,17 +43,17 @@ public class BoxRankingListAdapter extends BaseQuickAdapter<TreasureRankingInfo,
|
||||
case 0:
|
||||
tvPosition.setVisibility(View.GONE);
|
||||
ivPosition.setVisibility(View.VISIBLE);
|
||||
ivPosition.setImageDrawable(ContextCompat.getDrawable(mContext, R.drawable.ic_box_ranking_first));
|
||||
ivPosition.setImageDrawable(ContextCompat.getDrawable(mContext, R.drawable.smash_eggs_rank_top1));
|
||||
break;
|
||||
case 1:
|
||||
tvPosition.setVisibility(View.GONE);
|
||||
ivPosition.setVisibility(View.VISIBLE);
|
||||
ivPosition.setImageDrawable(ContextCompat.getDrawable(mContext, R.drawable.ic_box_ranking_second));
|
||||
ivPosition.setImageDrawable(ContextCompat.getDrawable(mContext, R.drawable.smash_eggs_rank_top2));
|
||||
break;
|
||||
case 2:
|
||||
tvPosition.setVisibility(View.GONE);
|
||||
ivPosition.setVisibility(View.VISIBLE);
|
||||
ivPosition.setImageDrawable(ContextCompat.getDrawable(mContext, R.drawable.ic_box_ranking_third));
|
||||
ivPosition.setImageDrawable(ContextCompat.getDrawable(mContext, R.drawable.smash_eggs_rank_top3));
|
||||
break;
|
||||
default:
|
||||
tvPosition.setVisibility(View.VISIBLE);
|
||||
|
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 60 KiB |
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/smash_eggs_buy_bg_hammer" />
|
||||
|
||||
<item
|
||||
android:bottom="11dp"
|
||||
android:drawable="@drawable/smash_eggs_buy_ic_hammer"
|
||||
android:left="11dp"
|
||||
android:right="11dp"
|
||||
android:top="11dp" />
|
||||
</layer-list>
|
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 416 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.7 KiB |
@@ -11,328 +11,349 @@
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/root_view"
|
||||
android:id="@+id/layout_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{click}">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="311dp"
|
||||
android:layout_height="474dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/treasure_box_bg_normal"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/smash_eggs_bg"
|
||||
android:onClick="@{click}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintDimensionRatio="375:552">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tv_rank"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="44dp"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/treasure_box_rank"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="44dp"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/icon_room_box_more_normal"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamond_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
android:drawableTop="@drawable/treasure_box_diamond"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_more"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_more"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_more"
|
||||
tools:text="200" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_first_box"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="84dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_box_temp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_box_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/ic_box_1"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_box_2"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_first_box"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_first_box" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_box_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/ic_box_10"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_first_box"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_box_3"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_box_1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_box_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/ic_box_100"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_first_box"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_first_box"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_box_2" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cs_bottom"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/bg_8651e0_stroke_ffffff"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_first_box"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_first_box"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_first_box">
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_box_num"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:corner="@dimen/dp_8"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="42:16"
|
||||
<ImageView
|
||||
android:id="@+id/tv_rank"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/smash_eggs_ic_rank"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.145"
|
||||
app:solid="@color/color_7748C7" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_11"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/smash_eggs_ic_more"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line_hammer_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.766" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line_hammer_start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.045" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line_hammer_end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.957" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:src="@drawable/ic_token"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_1"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:background="@drawable/selector_bg_box_price"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="30:16"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_box_num"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.104" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.4"
|
||||
android:text="1"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_1"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_1"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_1"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_2"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:background="@drawable/selector_bg_box_price"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="30:16"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.104" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.4"
|
||||
android:text="10"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_2"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_2"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_2"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_2" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_3"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:background="@drawable/selector_bg_box_price"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="30:16"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_2"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.104" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.4"
|
||||
android:text="100"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_3"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_3"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_3"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_3" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/ed_input_num"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:background="@drawable/bg_7748c7_r10"
|
||||
android:gravity="center"
|
||||
android:hint="@string/please_input_quantity"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/white_tran_40"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_buy"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_3"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:id="@+id/iv_box_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:background="@drawable/bg_box_buy"
|
||||
android:gravity="center"
|
||||
android:text="@string/buy"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="52:22"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/smash_eggs_ic_hammer_1"
|
||||
app:layout_constraintDimensionRatio="78:53"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_box_2"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="@id/line_hammer_start"
|
||||
app:layout_constraintTop_toTopOf="@id/line_hammer_top"
|
||||
app:layout_constraintWidth_percent="0.208" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_box_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/smash_eggs_ic_hammer_10"
|
||||
app:layout_constraintDimensionRatio="78:53"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_box_3"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_box_1"
|
||||
app:layout_constraintTop_toTopOf="@id/line_hammer_top"
|
||||
app:layout_constraintWidth_percent="0.208" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_box_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/smash_eggs_ic_hammer_100"
|
||||
app:layout_constraintDimensionRatio="78:53"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_box_4"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_box_2"
|
||||
app:layout_constraintTop_toTopOf="@id/line_hammer_top"
|
||||
app:layout_constraintWidth_percent="0.208" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_box_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/smash_eggs_ic_hammer_200"
|
||||
app:layout_constraintDimensionRatio="78:53"
|
||||
app:layout_constraintEnd_toEndOf="@id/line_hammer_end"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_box_3"
|
||||
app:layout_constraintTop_toTopOf="@id/line_hammer_top"
|
||||
app:layout_constraintWidth_percent="0.208" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line_bottom"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.913" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cs_bottom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_7821e8_15dp"
|
||||
app:layout_constraintDimensionRatio="288:28"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.18" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/line_bottom"
|
||||
app:layout_constraintWidth_percent="0.768">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line_num_start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.055" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line_num_icon_start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.013" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_box_num"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:autoSizeMaxTextSize="@dimen/sp_10"
|
||||
android:autoSizeMinTextSize="@dimen/sp_7"
|
||||
android:autoSizeStepGranularity="1sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:autoSizeMaxTextSize="@dimen/sp_10"
|
||||
app:autoSizeMinTextSize="@dimen/sp_7"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:corner="@dimen/dp_8"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="42:16"
|
||||
app:layout_constraintEnd_toStartOf="@id/view_1"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="@id/line_num_start"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.145"
|
||||
app:solid="@color/color_7748C7" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@drawable/smash_eggs_ic_hammer"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="@id/line_num_icon_start"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.08" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_1"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:background="@drawable/selector_bg_box_price"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="31:16"
|
||||
app:layout_constraintEnd_toStartOf="@id/view_2"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_box_num"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.107" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.6"
|
||||
android:text="1"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_1"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_1"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_1"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_2"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:background="@drawable/selector_bg_box_price"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="31:16"
|
||||
app:layout_constraintEnd_toStartOf="@id/view_3"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.107" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.6"
|
||||
android:text="10"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_2"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_2"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_2"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_2" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_3"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:background="@drawable/selector_bg_box_price"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="31:16"
|
||||
app:layout_constraintEnd_toStartOf="@id/ed_input_num"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_2"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.107" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.6"
|
||||
android:text="100"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_3"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_3"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_3"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_3" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/ed_input_num"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:autoSizeMaxTextSize="@dimen/sp_10"
|
||||
android:autoSizeMinTextSize="@dimen/sp_7"
|
||||
android:autoSizeStepGranularity="1sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:background="@drawable/base_shape_33ffffff_9dp"
|
||||
android:gravity="center"
|
||||
android:hint="@string/please_input_quantity"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:paddingHorizontal="2dp"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/white_tran_60"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:autoSizeMaxTextSize="@dimen/sp_10"
|
||||
app:autoSizeMinTextSize="@dimen/sp_7"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="56:18"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_buy"
|
||||
app:layout_constraintStart_toEndOf="@id/view_3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.194" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line_buy_end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.989" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:autoSizeMaxTextSize="@dimen/sp_10"
|
||||
android:autoSizeMinTextSize="@dimen/sp_7"
|
||||
android:autoSizeStepGranularity="1sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:background="@drawable/smash_eggs_ic_buy"
|
||||
android:gravity="center"
|
||||
android:text="@string/buy"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:autoSizeMaxTextSize="@dimen/sp_10"
|
||||
app:autoSizeMinTextSize="@dimen/sp_7"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="52:22"
|
||||
app:layout_constraintEnd_toEndOf="@id/line_buy_end"
|
||||
app:layout_constraintStart_toEndOf="@id/ed_input_num"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.18" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line_open_anim_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.378" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/iv_box_open"
|
||||
android:layout_width="match_parent"
|
||||
app:fillMode="Backward"
|
||||
app:clearsAfterDetached="true"
|
||||
android:layout_height="match_parent"
|
||||
app:loopCount="1"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_prize_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="135dp"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginBottom="110dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:layout_width="200dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/iv_box"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="242dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="52dp"
|
||||
android:onClick="@{click}"
|
||||
android:visibility="invisible"
|
||||
app:autoPlay="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:loopCount="999999"
|
||||
app:source="svga/gold_box_bg.svga" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/iv_box_open"
|
||||
android:layout_width="190dp"
|
||||
android:layout_height="242dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="52dp"
|
||||
app:autoPlay="false"
|
||||
app:fillMode="Clear"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:loopCount="1"
|
||||
app:source="svga/gold_box_open.svga" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift_anim"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_box"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_box"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_box"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_box" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_prize_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="135dp"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginBottom="110dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga_gift_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="80dp"
|
||||
android:layout_marginTop="60dp"
|
||||
app:autoPlay="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_box"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_box"
|
||||
app:loopCount="1"
|
||||
app:source="svga/bubble_tran_bg.svga"
|
||||
tools:background="@color/white"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<com.chwl.app.avroom.widget.RoomEffectBoxView
|
||||
android:id="@+id/effect_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
|
@@ -9,31 +9,21 @@
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="288dp"
|
||||
android:background="@drawable/treasure_box_bg_love_lack"
|
||||
android:layout_height="289dp"
|
||||
android:background="@drawable/smash_eggs_buy_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.6" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_buy_love"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:background="@drawable/treasure_box_buy_love"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:src="@drawable/treasure_box_ic_close"
|
||||
android:src="@drawable/smash_eggs_buy_ic_close"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg" />
|
||||
|
||||
@@ -45,10 +35,10 @@
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_buy_love"/>
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
@@ -57,7 +47,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="8dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_love_token"
|
||||
android:src="@drawable/smash_eggs_buy_hammer"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_lack_love" />
|
||||
@@ -68,7 +58,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="5dp"
|
||||
android:drawableStart="@drawable/treasure_box_ic_diamond"
|
||||
android:drawableStart="@drawable/icon_diamond"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
@@ -82,13 +72,10 @@
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:text="購買"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_white"
|
||||
android:layout_width="152dp"
|
||||
android:layout_height="32dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/btn_box_buy"
|
||||
android:background="@drawable/smash_eggs_buy_bg_buy"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:corner="@dimen/dp_18"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
@@ -97,7 +84,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/cbPay"
|
||||
android:text="今日不再提示"
|
||||
android:text="@string/star_send_gift_ignore_today"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textColor="@color/color_A3A3A3"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
|
@@ -10,45 +10,35 @@
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="240dp"
|
||||
android:background="@drawable/treasure_box_bg_love_lack"
|
||||
android:background="@drawable/smash_eggs_buy_success_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.6" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_buy_love"
|
||||
android:layout_width="144dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:background="@drawable/treasure_box_buy_love"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:src="@drawable/treasure_box_ic_close"
|
||||
android:src="@drawable/smash_eggs_buy_ic_close"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_lack_love"
|
||||
android:text="獲得"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:text="@string/get"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_7147E6"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_buy_love"/>
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
@@ -57,7 +47,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="8dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_love_token"
|
||||
android:src="@drawable/smash_eggs_buy_hammer"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_lack_love" />
|
||||
|
@@ -11,47 +11,45 @@
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/treasure_box_bg_love_lack"
|
||||
android:src="@drawable/smash_eggs_buy_multi_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.6" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/view_buy_love"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_48"
|
||||
android:layout_marginEnd="@dimen/dp_48"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/treasure_box_buy_love"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:src="@drawable/treasure_box_ic_close"
|
||||
android:src="@drawable/smash_eggs_buy_ic_close"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_lack_love"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="可用愛心不足,請購買"
|
||||
android:layout_marginHorizontal="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:autoSizeMaxTextSize="@dimen/sp_12"
|
||||
android:autoSizeMinTextSize="@dimen/sp_7"
|
||||
android:autoSizeStepGranularity="1sp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:gravity="center"
|
||||
android:text="@string/hammers_insufficient_buy"
|
||||
android:textColor="@color/color_7147E6"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:autoSizeMaxTextSize="@dimen/sp_12"
|
||||
app:autoSizeMinTextSize="@dimen/sp_7"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_buy_love" />
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
@@ -60,7 +58,7 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="8dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_love_token"
|
||||
android:src="@drawable/smash_eggs_buy_hammer"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_lack_love" />
|
||||
@@ -71,7 +69,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:drawableStart="@drawable/treasure_box_ic_diamond"
|
||||
android:drawableStart="@drawable/icon_diamond"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
@@ -85,22 +83,22 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_add_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_width="@dimen/dp_146"
|
||||
android:layout_height="@dimen/dp_25"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:background="@drawable/bg_add_num_bg"
|
||||
android:background="@drawable/smash_eggs_buy_multi_bg_num"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_prize_name">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_sub"
|
||||
android:id="@+id/iv_add"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:src="@drawable/treasure_box_sub_normal" />
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:src="@drawable/smash_eggs_buy_multi_add" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_num"
|
||||
@@ -116,12 +114,12 @@
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_add"
|
||||
android:id="@+id/iv_sub"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_21"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="@dimen/dp_2"
|
||||
android:src="@drawable/treasure_box_add_normal" />
|
||||
android:src="@drawable/smash_eggs_buy_multi_subtract" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -130,11 +128,8 @@
|
||||
android:layout_width="@dimen/dp_152"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/btn_box_buy"
|
||||
android:background="@drawable/smash_eggs_buy_bg_buy"
|
||||
android:gravity="center"
|
||||
android:text="購買"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:corner="@dimen/dp_18"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
|
@@ -3,4 +3,6 @@
|
||||
<string name="text_more_load_end">لا توجد بيانات إضافية</string>
|
||||
<string name="text_more_load_failed">فشل التحميل، اضغط للمحاولة مرة أخرى</string>
|
||||
<string name="text_more_loading">جار التحميل…</string>
|
||||
|
||||
<string name="hammers_insufficient_buy">ليس هناك ما يكفي من المطارق المتاحة، يرجى شراء واحدة</string>
|
||||
</resources>
|
@@ -3,4 +3,5 @@
|
||||
<string name="text_more_load_end">沒有更多數據</string>
|
||||
<string name="text_more_load_failed">加載失敗,請點我重試</string>
|
||||
<string name="text_more_loading">正在加載中…</string>
|
||||
<string name="hammers_insufficient_buy">可用錘子不足,請購買</string>
|
||||
</resources>
|
@@ -3,4 +3,6 @@
|
||||
<string name="text_more_load_end">No more data</string>
|
||||
<string name="text_more_load_failed">Load failed, tap to retry</string>
|
||||
<string name="text_more_loading">Loading…</string>
|
||||
|
||||
<string name="hammers_insufficient_buy">Not enough hammers available, please buy one</string>
|
||||
</resources>
|
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#33FFFFFF" />
|
||||
<corners android:radius="9dp" />
|
||||
</shape>
|