爱豆计划。
BIN
BaseModule/src/main/assets/prize_call_box_default.svga
Normal file
BIN
BaseModule/src/main/assets/prize_call_open_box.svga
Normal file
@@ -18,6 +18,10 @@ public class BlindReslutBean {
|
||||
public class ReslutList {
|
||||
private int gift_id;//中奖礼物Id
|
||||
private int count;//中奖礼物数量
|
||||
|
||||
private String gift_price = "";
|
||||
private String gift_name = "";
|
||||
private String base_image = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ public class RoomSettingBean implements MultiItemEntity {
|
||||
|
||||
public static final int QXRoomSettingTypeRoomBusinessTime = 37;//营业时间
|
||||
public static final int QXRoomSettingTypeRoomBusinessLegend = 38;//炼仙传说
|
||||
public static final int QXRoomSettingTypeRoomBusinessLOVE = 39;//爱豆计划
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -115,6 +115,9 @@ public class GiftLotteryDialogFragment extends BaseMvpDialogFragment<GiftLottery
|
||||
}else if (giftBagId.equals("12")){
|
||||
mBinding.clRoot.setBackgroundResource(R.mipmap.skzj);
|
||||
mBinding.imJc.setImageResource(R.mipmap.skzl_jl);
|
||||
}else if (giftBagId.equals("61")){
|
||||
mBinding.clRoot.setBackgroundResource(R.mipmap.icon_love_record_bg);
|
||||
mBinding.imJc.setImageResource(R.mipmap.skzl_jl);
|
||||
}
|
||||
|
||||
mBinding.smartRefreshLayout.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
|
||||
|
||||
@@ -81,6 +81,9 @@ public class PrizePoolDialog extends BaseDialog<DialogPrizePoolBinding> {
|
||||
}else if (type == 13){
|
||||
mBinding.clPrize.setBackgroundResource(R.mipmap.xlh);
|
||||
mBinding.imJc.setImageResource(R.mipmap.xlh_jc);
|
||||
}else if (type == 38){
|
||||
mBinding.clPrize.setBackgroundResource(R.mipmap.icon_love_record_bg);
|
||||
mBinding.imJc.setImageResource(R.mipmap.xlh_jc);
|
||||
}
|
||||
|
||||
// 根据屏幕密度调整行数和列数
|
||||
|
||||
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_love_prize_pool.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_love_record.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_love_record_bg.png
Normal file
|
After Width: | Height: | Size: 257 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_love_rule.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/icon_rule_love_bg.png
Normal file
|
After Width: | Height: | Size: 257 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/prize_call_box_open_1.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/prize_call_box_open_10.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
BaseModule/src/main/res/mipmap-hdpi/prize_call_box_open_20.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_love_prize_pool.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_love_record.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_love_record_bg.png
Normal file
|
After Width: | Height: | Size: 266 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/icon_love_rule.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/prize_award_config.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/prize_award_multiple_bg.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/prize_award_open1.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/prize_award_open10.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/prize_award_open20.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/prize_award_single_bg.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/prize_call_box_gift.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/prize_call_box_open_1.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/prize_call_box_open_10.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/prize_call_box_open_20.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_love_prize_pool.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_love_record.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_love_record_bg.png
Normal file
|
After Width: | Height: | Size: 404 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/icon_love_rule.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/prize_call_box_open_1.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/prize_call_box_open_10.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/prize_call_box_open_20.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
@@ -163,6 +163,8 @@ public class HorizontalListAdapter extends RecyclerView.Adapter<HorizontalListAd
|
||||
return b ? com.xscm.moduleutil.R.mipmap.red_effect_off : com.xscm.moduleutil.R.mipmap.red_effect_on;
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomBusinessLegend:
|
||||
return com.xscm.moduleutil.R.mipmap.lxcs_iocn;
|
||||
case RoomSettingBean.QXRoomSettingTypeRoomBusinessLOVE:
|
||||
return com.xscm.moduleutil.R.mipmap.icon_love_station;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,369 @@
|
||||
package com.xscm.modulemain.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import com.blankj.utilcode.util.ActivityUtils
|
||||
import com.blankj.utilcode.util.ToastUtils
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.opensource.svgaplayer.SVGACallback
|
||||
import com.opensource.svgaplayer.SVGAParser
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.databinding.DialogLoveStationDrawLayoutBinding
|
||||
import com.xscm.moduleutil.bean.GiftBean
|
||||
import com.xscm.moduleutil.bean.WalletBean
|
||||
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean
|
||||
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean
|
||||
import com.xscm.moduleutil.dialog.giftLottery.GiftLotteryDialogFragment
|
||||
import com.xscm.moduleutil.dialog.giftLottery.PrizePoolDialog
|
||||
import com.xscm.moduleutil.http.BaseObserver
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
import com.xscm.moduleutil.utils.ImageUtils
|
||||
import com.xscm.moduleutil.widget.dialog.BaseDialog
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
class DialogLoveStationDraw(context: Context,val fragmentManager: FragmentManager) :
|
||||
BaseDialog<DialogLoveStationDrawLayoutBinding>(context) {
|
||||
|
||||
init {
|
||||
window?.apply {
|
||||
setGravity(Gravity.BOTTOM)
|
||||
}
|
||||
|
||||
setCancelable(false)
|
||||
setCanceledOnTouchOutside(false)
|
||||
}
|
||||
|
||||
private var isLottery = false
|
||||
|
||||
private var mRoomId: String = ""
|
||||
private var mGiftBagId: String = ""
|
||||
|
||||
private var itemAdapter: ItemAdapter? = null
|
||||
private var itemRecord: ItemRecordAdapter? = null
|
||||
private var httpError = false
|
||||
|
||||
private var currLottery = 1
|
||||
|
||||
private var resultList: MutableList<BlindReslutBean.ReslutList> = mutableListOf()
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.dialog_love_station_draw_layout
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
mBinding.ivClose.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
mBinding.iv1.setOnClickListener {
|
||||
lottery(1)
|
||||
}
|
||||
|
||||
mBinding.iv10.setOnClickListener {
|
||||
lottery(10)
|
||||
}
|
||||
|
||||
mBinding.iv20.setOnClickListener {
|
||||
lottery(20)
|
||||
}
|
||||
mBinding.ivOnOrOff.tag = 1
|
||||
mBinding.ivOnOrOff.setOnClickListener {
|
||||
if (mBinding.ivOnOrOff.tag == 1) {
|
||||
mBinding.ivOnOrOff.tag = 0
|
||||
mBinding.ivOnOrOff.setImageResource(R.mipmap.prize_call_box_gift_anim_on)
|
||||
} else {
|
||||
mBinding.ivOnOrOff.tag = 1
|
||||
mBinding.ivOnOrOff.setImageResource(R.mipmap.prize_call_box_gift_anim_off)
|
||||
}
|
||||
}
|
||||
|
||||
itemAdapter = ItemAdapter()
|
||||
mBinding.recycleView.adapter = itemAdapter
|
||||
|
||||
itemRecord = ItemRecordAdapter()
|
||||
itemRecord?.setNewData(resultMyRecordList)
|
||||
mBinding.recyclerMyRecord.adapter = itemRecord
|
||||
|
||||
|
||||
mBinding.ivRule.setOnClickListener {
|
||||
//规则
|
||||
val bundle = Bundle()
|
||||
bundle.putString("url", ruleUrl)
|
||||
bundle.putInt("type", type)
|
||||
val dialog = WebViewDialog(ActivityUtils.getTopActivity(), bundle)
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
mBinding.ivPrizePool.setOnClickListener {
|
||||
//奖池
|
||||
val prizePoolDialog = PrizePoolDialog(ActivityUtils.getTopActivity())
|
||||
prizePoolDialog.updateData(prizePoolList, type)
|
||||
prizePoolDialog.show()
|
||||
}
|
||||
|
||||
mBinding.ivMyRecord.setOnClickListener {
|
||||
//记录
|
||||
val giftLotteryDialogFragment = GiftLotteryDialogFragment.newInstance(mGiftBagId)
|
||||
giftLotteryDialogFragment.show(fragmentManager, "GiftLotteryDialogFragment")
|
||||
}
|
||||
|
||||
|
||||
|
||||
mBinding.smartRefresh.setOnLoadMoreListener(object : OnRefreshLoadMoreListener {
|
||||
override fun onRefresh(refreshLayout: RefreshLayout) {
|
||||
page = 1
|
||||
getMyRecord()
|
||||
}
|
||||
|
||||
override fun onLoadMore(refreshLayout: RefreshLayout) {
|
||||
page++
|
||||
getMyRecord()
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
private fun lottery(count: Int) {
|
||||
if (isLottery) {
|
||||
ToastUtils.showShort("正在抽取中...")
|
||||
return
|
||||
}
|
||||
isLottery = true
|
||||
|
||||
if (mBinding.ivOnOrOff.tag == 1) {
|
||||
startAnim()
|
||||
}
|
||||
currLottery = count
|
||||
startLottery(mRoomId, mGiftBagId, count.toString())
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
fun show(roomId: String, giftBagId: String) {
|
||||
super.show()
|
||||
mRoomId = roomId
|
||||
mGiftBagId = giftBagId
|
||||
getUserWallet()
|
||||
startAnimDefault()
|
||||
getLottery()
|
||||
}
|
||||
|
||||
private fun startAnimDefault() {
|
||||
mBinding.svgaAnimDefault.visibility = View.VISIBLE
|
||||
// 停止并清除当前动画
|
||||
mBinding.svgaAnimDefault.stopAnimation()
|
||||
mBinding.svgaAnimDefault.clear()
|
||||
// 使用SVGAParser重新解析
|
||||
val parser = SVGAParser(context)
|
||||
parser.decodeFromAssets("prize_call_box_default.svga",
|
||||
object : SVGAParser.ParseCompletion {
|
||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
mBinding.svgaAnimDefault.setVideoItem(videoItem)
|
||||
mBinding.svgaAnimDefault.clearsAfterStop = true
|
||||
|
||||
// 开始动画
|
||||
mBinding.svgaAnimDefault.startAnimation()
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
// 处理错误
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
private fun startAnim() {
|
||||
mBinding.svgaAnim.visibility = View.VISIBLE
|
||||
// 停止并清除当前动画
|
||||
mBinding.svgaAnim.stopAnimation()
|
||||
mBinding.svgaAnim.clear()
|
||||
|
||||
// 使用SVGAParser重新解析
|
||||
val parser = SVGAParser(context)
|
||||
parser.decodeFromAssets("prize_call_open_box.svga",
|
||||
object : SVGAParser.ParseCompletion {
|
||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
mBinding.svgaAnim.setVideoItem(videoItem)
|
||||
mBinding.svgaAnim.clearsAfterStop = true
|
||||
|
||||
// 设置回调
|
||||
mBinding.svgaAnim.callback = object : SVGACallback {
|
||||
override fun onFinished() {
|
||||
isLottery = false
|
||||
mBinding.svgaAnimDefault.startAnimation()
|
||||
if (resultList.isNotEmpty()) {
|
||||
// mBinding.recycleView.visibility = View.VISIBLE
|
||||
// itemAdapter?.setNewData(resultList)
|
||||
DialogLoveStationResult(context).show(mRoomId,mGiftBagId,currLottery, resultList, object : DialogLoveStationResult.OnResultListener {
|
||||
override fun onLottery() {
|
||||
getUserWallet()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {}
|
||||
override fun onRepeat() {}
|
||||
override fun onStep(frame: Int, percentage: Double) {
|
||||
if (frame == 1) {
|
||||
mBinding.svgaAnimDefault.stopAnimation()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (httpError)
|
||||
return
|
||||
// 开始动画
|
||||
mBinding.svgaAnim.startAnimation()
|
||||
}
|
||||
|
||||
override fun onError() {
|
||||
// 处理错误
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
class ItemAdapter :
|
||||
BaseQuickAdapter<BlindReslutBean.ReslutList, BaseViewHolder>(R.layout.item_lottery_gift_layout) {
|
||||
override fun convert(helper: BaseViewHolder, item: BlindReslutBean.ReslutList) {
|
||||
helper.setText(R.id.tv_name, item.gift_name + "x" + item.count)
|
||||
helper.setText(R.id.tv_price, item.gift_price)
|
||||
ImageUtils.loadHead(item.base_image, helper.getView(R.id.iv_gift))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private fun startLottery(roomId: String, giftBagId: String, num: String) {
|
||||
RetrofitClient.getInstance().drawGiftList(
|
||||
giftBagId,
|
||||
"",
|
||||
roomId,
|
||||
num,
|
||||
"",
|
||||
"",
|
||||
object : BaseObserver<BlindReslutBean>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
|
||||
}
|
||||
|
||||
override fun onNext(t: BlindReslutBean) {
|
||||
getUserWallet()
|
||||
resultList.clear()
|
||||
if (t.reslut_list == null) {
|
||||
isLottery = false
|
||||
httpError = true
|
||||
if (mBinding.svgaAnim.isAnimating) {
|
||||
mBinding.svgaAnim.stopAnimation()
|
||||
}
|
||||
return
|
||||
}
|
||||
httpError = false
|
||||
resultList.addAll(t.reslut_list)
|
||||
if (mBinding.ivOnOrOff.tag != 1) {
|
||||
isLottery = false
|
||||
// mBinding.recycleView.visibility = View.VISIBLE
|
||||
// itemAdapter?.setNewData(resultList)
|
||||
DialogLoveStationResult(context).show(mRoomId,mGiftBagId,currLottery, resultList, object : DialogLoveStationResult.OnResultListener {
|
||||
override fun onLottery() {
|
||||
getUserWallet()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
private var ruleUrl = ""
|
||||
private var type = 38
|
||||
private var prizePoolList:MutableList<GiftBean>? = null
|
||||
|
||||
private fun getUserWallet() {
|
||||
RetrofitClient.getInstance().wallet(object : BaseObserver<WalletBean>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
|
||||
}
|
||||
|
||||
override fun onNext(t: WalletBean) {
|
||||
mBinding.tvCount.text = t.coin
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private var page = 1
|
||||
private var pageSize = 30
|
||||
private var resultMyRecordList: MutableList<GiftBean> = mutableListOf()
|
||||
|
||||
|
||||
private fun getMyRecord() {
|
||||
RetrofitClient.getInstance().getMyRecord(
|
||||
mGiftBagId,
|
||||
page.toString(),
|
||||
pageSize.toString(),
|
||||
object : BaseObserver<List<GiftBean>>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
|
||||
}
|
||||
|
||||
override fun onNext(giftBean: List<GiftBean>) {
|
||||
mBinding.smartRefresh.finishRefresh()
|
||||
mBinding.smartRefresh.finishLoadMore()
|
||||
|
||||
if (giftBean.isNotEmpty()){
|
||||
return
|
||||
}
|
||||
|
||||
if (page == 1) {
|
||||
resultMyRecordList.clear()
|
||||
itemRecord?.setNewData(resultMyRecordList)
|
||||
}
|
||||
resultMyRecordList.addAll(giftBean)
|
||||
itemRecord?.notifyDataSetChanged()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
class ItemRecordAdapter :
|
||||
BaseQuickAdapter<GiftBean, BaseViewHolder>(R.layout.item_lottery_gift_layout) {
|
||||
override fun convert(helper: BaseViewHolder, item: GiftBean) {
|
||||
helper.setText(R.id.tv_name, item.gift_name + "x" + item.count)
|
||||
helper.setText(R.id.tv_price, item.gift_price)
|
||||
ImageUtils.loadHead(item.base_image, helper.getView(R.id.iv_gift))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun getLottery(){
|
||||
RetrofitClient.getInstance().getBoxGiftList(mGiftBagId, mRoomId, object : BaseObserver<BlindBoxBean?>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onNext(blindBoxBeans: BlindBoxBean) {
|
||||
val oneLottery = blindBoxBeans.box_price
|
||||
|
||||
ruleUrl = blindBoxBeans.rule_url
|
||||
prizePoolList = blindBoxBeans.gift_list
|
||||
|
||||
mBinding.tv1.text = oneLottery.toString()
|
||||
mBinding.tv10.text = (oneLottery * 10).toString()
|
||||
mBinding.tv20.text = (oneLottery * 20).toString()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
package com.xscm.modulemain.dialog
|
||||
|
||||
import android.content.Context
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.databinding.DialogLoveStationDrawResultLayoutBinding
|
||||
import com.xscm.moduleutil.bean.GiftBean
|
||||
import com.xscm.moduleutil.bean.blindboxwheel.BlindBoxBean
|
||||
import com.xscm.moduleutil.bean.blindboxwheel.BlindReslutBean
|
||||
import com.xscm.moduleutil.dialog.giftLottery.GiftLotteryContacts
|
||||
import com.xscm.moduleutil.http.BaseObserver
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
import com.xscm.moduleutil.utils.ImageUtils
|
||||
import com.xscm.moduleutil.widget.dialog.BaseDialog
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
class DialogLoveStationResult(context: Context) :
|
||||
BaseDialog<DialogLoveStationDrawResultLayoutBinding>(context) {
|
||||
|
||||
init {
|
||||
window?.apply {
|
||||
setGravity(Gravity.CENTER)
|
||||
}
|
||||
|
||||
setCancelable(false)
|
||||
setCanceledOnTouchOutside(false)
|
||||
}
|
||||
|
||||
|
||||
private var mRoomId: String = ""
|
||||
private var mGiftBagId: String = ""
|
||||
|
||||
private var count = 0
|
||||
|
||||
private var itemAdapter: ItemAdapter? = null
|
||||
private var httpError = false
|
||||
|
||||
private var resultList: MutableList<BlindReslutBean.ReslutList> = mutableListOf()
|
||||
|
||||
private var listener: OnResultListener? = null
|
||||
|
||||
|
||||
interface OnResultListener {
|
||||
fun onLottery()
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.dialog_love_station_draw_result_layout
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
mBinding.ivClose.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
mBinding.ivCloseA.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
mBinding.ivLottery1.setOnClickListener {
|
||||
lottery(1)
|
||||
}
|
||||
|
||||
mBinding.ivLottery.setOnClickListener {
|
||||
lottery(count)
|
||||
}
|
||||
|
||||
itemAdapter = ItemAdapter()
|
||||
mBinding.recyclerMyRecord.adapter = itemAdapter
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
}
|
||||
|
||||
private fun lottery(count: Int) {
|
||||
startLottery(mRoomId, mGiftBagId, count.toString())
|
||||
}
|
||||
|
||||
|
||||
fun show(roomId: String, giftBagId: String, count: Int,resultList:MutableList<BlindReslutBean.ReslutList>, listener: OnResultListener) {
|
||||
super.show()
|
||||
mRoomId = roomId
|
||||
mGiftBagId = giftBagId
|
||||
this.listener = listener
|
||||
this.resultList = resultList
|
||||
this.count = count
|
||||
if (resultList.isNullOrEmpty()){
|
||||
|
||||
}else{
|
||||
itemAdapter?.setNewData(resultList)
|
||||
}
|
||||
if (count == 0){
|
||||
mBinding.smartRefresh.setOnLoadMoreListener(object : OnRefreshLoadMoreListener {
|
||||
override fun onRefresh(refreshLayout: RefreshLayout) {
|
||||
page = 1
|
||||
getMyRecord()
|
||||
}
|
||||
|
||||
override fun onLoadMore(refreshLayout: RefreshLayout) {
|
||||
page++
|
||||
getMyRecord()
|
||||
}
|
||||
})
|
||||
}else{
|
||||
mBinding.smartRefresh.setEnableRefresh(false)
|
||||
mBinding.smartRefresh.setEnableLoadMore(false)
|
||||
|
||||
if (count == 1){
|
||||
mBinding.ctl1.visibility = View.GONE
|
||||
mBinding.ctl2.visibility = View.VISIBLE
|
||||
|
||||
ImageUtils.loadHead(resultList[0].base_image,mBinding.ivGift)
|
||||
mBinding.tvName.text = resultList[0].gift_name
|
||||
}else{
|
||||
mBinding.ctl1.visibility = View.VISIBLE
|
||||
mBinding.ctl2.visibility = View.GONE
|
||||
|
||||
if (count == 10){
|
||||
mBinding.ivLottery.setImageResource(R.mipmap.prize_award_open10)
|
||||
}else if (count == 20){
|
||||
mBinding.ivLottery.setImageResource(R.mipmap.prize_award_open20)
|
||||
}
|
||||
|
||||
itemAdapter = ItemAdapter()
|
||||
mBinding.recyclerMyRecord.adapter = itemAdapter
|
||||
itemAdapter?.setNewData(resultList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class ItemAdapter :
|
||||
BaseQuickAdapter<BlindReslutBean.ReslutList, BaseViewHolder>(R.layout.item_lottery_gift_layout) {
|
||||
override fun convert(helper: BaseViewHolder, item: BlindReslutBean.ReslutList) {
|
||||
helper.setText(R.id.tv_name, item.gift_name + "x" + item.count)
|
||||
helper.setText(R.id.tv_price, item.gift_price)
|
||||
ImageUtils.loadHead(item.base_image, helper.getView(R.id.iv_gift))
|
||||
}
|
||||
}
|
||||
|
||||
private fun startLottery(roomId: String, giftBagId: String, num: String) {
|
||||
RetrofitClient.getInstance().drawGiftList(
|
||||
giftBagId,
|
||||
"",
|
||||
roomId,
|
||||
num,
|
||||
"",
|
||||
"",
|
||||
object : BaseObserver<BlindReslutBean>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
|
||||
}
|
||||
|
||||
override fun onNext(t: BlindReslutBean) {
|
||||
listener?.onLottery()
|
||||
|
||||
if (count == 1){
|
||||
ImageUtils.loadHead(t.reslut_list[0].base_image,mBinding.ivGift)
|
||||
mBinding.tvName.text = t.reslut_list[0].gift_name
|
||||
|
||||
mBinding.ivGift.animate()
|
||||
.scaleX(1.5f)
|
||||
.scaleY(1.5f)
|
||||
.setDuration(250)
|
||||
.withEndAction {
|
||||
mBinding.ivGift.animate()
|
||||
.scaleX(1f)
|
||||
.scaleY(1f)
|
||||
.setDuration(250)
|
||||
.start()
|
||||
}
|
||||
.start()
|
||||
}else{
|
||||
resultList.clear()
|
||||
if (t.reslut_list == null) {
|
||||
httpError = true
|
||||
return
|
||||
}
|
||||
httpError = false
|
||||
resultList.addAll(t.reslut_list)
|
||||
itemAdapter?.setNewData(resultList)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
private var page = 1
|
||||
private var pageSize = 30
|
||||
private var resultMyRecordList: MutableList<GiftBean> = mutableListOf()
|
||||
|
||||
|
||||
private fun getMyRecord() {
|
||||
RetrofitClient.getInstance().getMyRecord(
|
||||
mGiftBagId,
|
||||
page.toString(),
|
||||
pageSize.toString(),
|
||||
object : BaseObserver<List<GiftBean>>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
|
||||
}
|
||||
|
||||
override fun onNext(giftBean: List<GiftBean>) {
|
||||
mBinding.smartRefresh.finishRefresh()
|
||||
mBinding.smartRefresh.finishLoadMore()
|
||||
|
||||
if (giftBean.isNotEmpty()) {
|
||||
return
|
||||
}
|
||||
if (page == 1) {
|
||||
resultMyRecordList.clear()
|
||||
}
|
||||
resultMyRecordList.addAll(giftBean)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
class ItemRecordAdapter :
|
||||
BaseQuickAdapter<GiftBean, BaseViewHolder>(R.layout.item_lottery_gift_layout) {
|
||||
override fun convert(helper: BaseViewHolder, item: GiftBean) {
|
||||
helper.setText(R.id.tv_name, item.gift_name + "x" + item.count)
|
||||
helper.setText(R.id.tv_price, item.gift_price)
|
||||
ImageUtils.loadHead(item.base_image, helper.getView(R.id.iv_gift))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.xscm.modulemain.dialog;
|
||||
|
||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomBusinessLOVE;
|
||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomBusinessLegend;
|
||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomBusinessTime;
|
||||
import static com.xscm.moduleutil.bean.room.RoomSettingBean.QXRoomSettingTypeRoomOrderMic;
|
||||
@@ -530,6 +531,8 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
dialog.show(getChildFragmentManager(), "DoubleTimePicker");
|
||||
} else if (bean.getType() == QXRoomSettingTypeRoomBusinessLegend) {
|
||||
new BoxMainDialog2((RoomActivity) getSelfActivity()).show(getChildFragmentManager(), "马迎新春");
|
||||
} else if(bean.getType() == QXRoomSettingTypeRoomBusinessLOVE){
|
||||
new DialogLoveStationDraw(getSelfActivity(),getChildFragmentManager()).show(roomId,"61");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -752,6 +755,10 @@ public class RoomSettingFragment extends BaseMvpDialogFragment<RoomSettingPresen
|
||||
if (status == 1) {
|
||||
moreChildren.add(new RoomSettingBean("马迎新春", "legend", null, null, QXRoomSettingTypeRoomBusinessLegend, read, isSelected, true, redSound));
|
||||
}
|
||||
}else if (giftBagId == 61) {
|
||||
if (status == 1) {
|
||||
moreChildren.add(new RoomSettingBean("爱豆计划", "love", null, null, QXRoomSettingTypeRoomBusinessLOVE, read, isSelected, true, redSound));
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// if (status == 1) {
|
||||
|
||||
@@ -95,6 +95,9 @@ public class WebViewDialog extends BaseDialog<WebViewDialogBinding> {
|
||||
}else if (type==13){
|
||||
mBinding.gzCl.setBackgroundResource(R.mipmap.xlh);
|
||||
mBinding.imGz.setImageResource(R.mipmap.xlh_gz);
|
||||
}else if (type==38){
|
||||
mBinding.gzCl.setBackgroundResource(R.mipmap.icon_love_record_bg);
|
||||
mBinding.imGz.setImageResource(R.mipmap.xlh_gz);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/prize_call_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_line_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.1" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guide_line_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.85" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga_anim_default"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:autoPlay="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:loopCount="0"
|
||||
app:source="prize_call_box_default.svga" />
|
||||
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga_anim"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:autoPlay="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:loopCount="1"
|
||||
app:source="prize_call_box_default.svga" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_25"
|
||||
android:background="@drawable/shape_15"
|
||||
android:backgroundTint="#FF29286D"
|
||||
android:drawableLeft="@mipmap/jinb"
|
||||
android:paddingHorizontal="@dimen/dp_5"
|
||||
android:paddingVertical="@dimen/dp_3"
|
||||
android:text="0"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:textColor="#FFFFD16E"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@id/ll_right"
|
||||
app:layout_constraintStart_toStartOf="@id/ll_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_right" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ll_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@id/ll_btn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/prize_call_box_open_1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:drawableStart="@mipmap/jinb"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_1"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_1"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_1" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/prize_call_box_open_10"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:drawableStart="@mipmap/jinb"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_10"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_10"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_10" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_20"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/prize_call_box_open_20"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_10" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_20"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:drawableStart="@mipmap/jinb"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_20"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_20"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_20" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/guide_line_2">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_rule"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_love_rule" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_prize_pool"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_love_prize_pool" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_my_record"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/icon_love_record" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_on_or_off"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:src="@mipmap/prize_call_box_gift_anim_off"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guide_line_2"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 按钮区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ll_btn">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_r53_f3f3f3"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_r53_0dffb9"
|
||||
android:backgroundTint="#3ABC6D"
|
||||
android:gravity="center"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycle_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_r8_top_aeedff"
|
||||
android:backgroundTint="@color/colorBlack85"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_50"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:visibility="gone"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:spanCount="3"
|
||||
tools:listitem="@layout/item_lottery_gift_layout" />
|
||||
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_r8_top_aeedff"
|
||||
android:backgroundTint="@color/colorBlack85"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_50"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_my_record"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="3"
|
||||
tools:listitem="@layout/item_lottery_gift_layout" />
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_56"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:paddingStart="@dimen/dp_5"
|
||||
android:paddingEnd="@dimen/sp_8"
|
||||
android:src="@mipmap/icon_lucky_close" />
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ctl_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/prize_award_multiple_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/prize_award_tittle"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:paddingTop="@dimen/dp_40"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_close_a"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_my_record"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="3"
|
||||
tools:listitem="@layout/item_lottery_gift_layout" />
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close_a"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_80"
|
||||
android:src="@mipmap/prize_award_config"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_lottery"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/smart_refresh" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_lottery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/prize_award_open1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_close_a"
|
||||
app:layout_constraintTop_toBottomOf="@id/smart_refresh" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ctl_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/prize_award_single_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:src="@mipmap/prize_award_multiple_item"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:src="@mipmap/icon_pri_gift_bg_1"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_gift_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_gift_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_gift_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_gift_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="0"
|
||||
android:textColor="@color/select_item_text"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_gift_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_gift_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_gift_bg" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/prize_award_tittle"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_gift_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_gift_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:src="@mipmap/prize_award_config"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_gift_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_lottery_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/prize_award_open1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_close"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -4,31 +4,46 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_4"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:background="@drawable/select_item_click"
|
||||
android:backgroundTint="#33E9E9E9"
|
||||
android:paddingHorizontal="@dimen/dp_25"
|
||||
android:paddingVertical="@dimen/dp_18">
|
||||
android:layout_marginStart="@dimen/dp_10">
|
||||
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:background="@mipmap/prize_award_multiple_item"
|
||||
android:src="@mipmap/icon_pri_gift_bg_1"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_glod"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_name"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_glod"
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="0"
|
||||
android:textColor="@color/select_item_text"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_gift"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textColor="@color/select_item_text"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
BIN
MainModule/src/main/res/mipmap-hdpi/icon_love_prize_pool.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_love_record.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_love_rule.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_love_station.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/prize_call_box_open_1.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/prize_call_box_open_10.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
MainModule/src/main/res/mipmap-hdpi/prize_call_box_open_20.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_love_prize_pool.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_love_record.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_love_rule.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_love_station.png
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_award_config.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_award_multiple_bg.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_award_open1.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_award_open10.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_award_open20.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_award_single_bg.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_award_tittle.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_call_bg.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_call_box_gift.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_call_box_open_1.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_call_box_open_10.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_call_box_open_20.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_call_box_rank.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_call_box_record.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
MainModule/src/main/res/mipmap-xhdpi/prize_call_open_box.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_love_prize_pool.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_love_record.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_love_rule.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_love_station.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/prize_call_box_open_1.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/prize_call_box_open_10.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/prize_call_box_open_20.png
Normal file
|
After Width: | Height: | Size: 24 KiB |