feat:删除房间寻爱、夺宝相关代码
This commit is contained in:
@@ -76,7 +76,6 @@ import com.chwl.app.common.widget.CircleImageView;
|
||||
import com.chwl.app.common.widget.CustomImageSpan;
|
||||
import com.chwl.app.common.widget.dialog.DialogManager;
|
||||
import com.chwl.app.home.dialog.HelloMessageDialog;
|
||||
import com.chwl.app.treasure_box.activity.TreasureBoxActivity;
|
||||
import com.chwl.app.ui.patriarch.help.LimitEnterRoomHelper;
|
||||
import com.chwl.app.ui.user.activity.UserInfoActivity;
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils;
|
||||
@@ -1362,7 +1361,7 @@ public class AVRoomActivity extends BaseMvpActivity<IAvRoomView, AvRoomPresenter
|
||||
.doOnSuccess(aLong -> {
|
||||
if (!DemoCache.readBoolean("FirstCharge", false) &&
|
||||
(UIUtils.isTopActivity(AVRoomActivity.this)
|
||||
|| UIUtils.isTopActivity(this, TreasureBoxActivity.class.getName())
|
||||
// || UIUtils.isTopActivity(this, TreasureBoxActivity.class.getName())
|
||||
|| UIUtils.isTopActivity(this, DialogWebViewActivity.class.getName())
|
||||
|| UIUtils.isTopActivity(this, RoomMsgActivity.class.getName()))) {
|
||||
FirstChargeDialog.start(this);
|
||||
|
@@ -682,8 +682,8 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
|
||||
R.id.iv_first_charge_enter -> FirstChargeDialog.start(mContext)
|
||||
R.id.iv_treasure_box,
|
||||
R.id.iv_treasure_box_cp -> GoldBoxHelper.handleBoxClick(mContext)
|
||||
// R.id.iv_treasure_box,
|
||||
// R.id.iv_treasure_box_cp -> GoldBoxHelper.handleBoxClick(mContext)
|
||||
|
||||
R.id.iv_radish_entrance -> PullRadishActivity.start(mContext)
|
||||
}
|
||||
|
@@ -32,24 +32,25 @@ public class GameRoomPresenter extends BaseRoomPresenter<IGameRoomView> {
|
||||
bannerInfo.setFirstCharge(true);
|
||||
bannerInfos.add(0, bannerInfo);
|
||||
}
|
||||
if(GoldBoxHelper.isShowFairy()){
|
||||
BannerInfo bannerInfo = new BannerInfo();
|
||||
bannerInfo.setFairy(true);
|
||||
bannerInfos.add(firstCharge ? 1 : 0, bannerInfo);
|
||||
}
|
||||
// if(GoldBoxHelper.isShowFairy()){
|
||||
// BannerInfo bannerInfo = new BannerInfo();
|
||||
// bannerInfo.setFairy(true);
|
||||
// bannerInfos.add(firstCharge ? 1 : 0, bannerInfo);
|
||||
// }
|
||||
List<BannerInfo> finalBannerInfos = bannerInfos;
|
||||
GoldBoxHelper.isHideBox()
|
||||
.subscribe(isHide -> {
|
||||
if (!isHide) {
|
||||
BannerInfo bannerInfo = new BannerInfo();
|
||||
bannerInfo.setBox(true);
|
||||
int index = 0;
|
||||
if (firstCharge) index++;
|
||||
if (GoldBoxHelper.isShowFairy()) index++;
|
||||
finalBannerInfos.add(index, bannerInfo);
|
||||
}
|
||||
getMvpView().onShowBanner(finalBannerInfos);
|
||||
}, throwable -> getMvpView().onShowBanner(finalBannerInfos));
|
||||
getMvpView().onShowBanner(finalBannerInfos);
|
||||
// GoldBoxHelper.isHideBox()
|
||||
// .subscribe(isHide -> {
|
||||
// if (!isHide) {
|
||||
// BannerInfo bannerInfo = new BannerInfo();
|
||||
// bannerInfo.setBox(true);
|
||||
// int index = 0;
|
||||
// if (firstCharge) index++;
|
||||
// if (GoldBoxHelper.isShowFairy()) index++;
|
||||
// finalBannerInfos.add(index, bannerInfo);
|
||||
// }
|
||||
// getMvpView().onShowBanner(finalBannerInfos);
|
||||
// }, throwable -> getMvpView().onShowBanner(finalBannerInfos));
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -315,24 +315,25 @@ public class HomePartyPresenter extends BaseRoomPresenter<IHomePartyView> {
|
||||
bannerInfo.setRadish(true);
|
||||
bannerInfos.add(firstCharge ? 1 : 0, bannerInfo);
|
||||
}
|
||||
GoldBoxHelper.isHideBox()
|
||||
.subscribe(isHide -> {
|
||||
if (!isHide) {
|
||||
BannerInfo bannerInfo = new BannerInfo();
|
||||
bannerInfo.setBox(true);
|
||||
int index = 0;
|
||||
if (firstCharge) index++;
|
||||
if (GoldBoxHelper.isShowRadish()) index++;
|
||||
bannerInfos.add(index, bannerInfo);
|
||||
}
|
||||
getMvpView().onShowBanner(bannerInfos);
|
||||
}, throwable -> getMvpView().onShowBanner(bannerInfos));
|
||||
getMvpView().onShowBanner(bannerInfos);
|
||||
// GoldBoxHelper.isHideBox()
|
||||
// .subscribe(isHide -> {
|
||||
// if (!isHide) {
|
||||
// BannerInfo bannerInfo = new BannerInfo();
|
||||
// bannerInfo.setBox(true);
|
||||
// int index = 0;
|
||||
// if (firstCharge) index++;
|
||||
// if (GoldBoxHelper.isShowRadish()) index++;
|
||||
// bannerInfos.add(index, bannerInfo);
|
||||
// }
|
||||
// getMvpView().onShowBanner(bannerInfos);
|
||||
// }, throwable -> getMvpView().onShowBanner(bannerInfos));
|
||||
} else {
|
||||
if(GoldBoxHelper.isShowFairy()){
|
||||
BannerInfo bannerInfo = new BannerInfo();
|
||||
bannerInfo.setFairy(true);
|
||||
bannerInfos.add(0, bannerInfo);
|
||||
}
|
||||
// if(GoldBoxHelper.isShowFairy()){
|
||||
// BannerInfo bannerInfo = new BannerInfo();
|
||||
// bannerInfo.setFairy(true);
|
||||
// bannerInfos.add(0, bannerInfo);
|
||||
// }
|
||||
if (firstCharge) {
|
||||
BannerInfo bannerInfo = new BannerInfo();
|
||||
bannerInfo.setFirstCharge(true);
|
||||
|
@@ -32,24 +32,25 @@ public class SingleRoomPresenter extends BaseRoomPresenter<ISingleRoomView> {
|
||||
bannerInfo.setRadish(true);
|
||||
bannerInfos.add(firstCharge ? 1 : 0, bannerInfo);
|
||||
}
|
||||
GoldBoxHelper.isHideBox()
|
||||
.subscribe(isHide -> {
|
||||
if (!isHide) {
|
||||
BannerInfo bannerInfo = new BannerInfo();
|
||||
bannerInfo.setBox(true);
|
||||
int index = 0;
|
||||
if (firstCharge) index++;
|
||||
if (GoldBoxHelper.isShowRadish()) index++;
|
||||
bannerInfos.add(index, bannerInfo);
|
||||
}
|
||||
getMvpView().onShowBanner(bannerInfos);
|
||||
}, throwable -> getMvpView().onShowBanner(bannerInfos));
|
||||
getMvpView().onShowBanner(bannerInfos);
|
||||
// GoldBoxHelper.isHideBox()
|
||||
// .subscribe(isHide -> {
|
||||
// if (!isHide) {
|
||||
// BannerInfo bannerInfo = new BannerInfo();
|
||||
// bannerInfo.setBox(true);
|
||||
// int index = 0;
|
||||
// if (firstCharge) index++;
|
||||
// if (GoldBoxHelper.isShowRadish()) index++;
|
||||
// bannerInfos.add(index, bannerInfo);
|
||||
// }
|
||||
// getMvpView().onShowBanner(bannerInfos);
|
||||
// }, throwable -> getMvpView().onShowBanner(bannerInfos));
|
||||
} else {
|
||||
if(GoldBoxHelper.isShowFairy()){
|
||||
BannerInfo bannerInfo = new BannerInfo();
|
||||
bannerInfo.setFairy(true);
|
||||
bannerInfos.add(0, bannerInfo);
|
||||
}
|
||||
// if(GoldBoxHelper.isShowFairy()){
|
||||
// BannerInfo bannerInfo = new BannerInfo();
|
||||
// bannerInfo.setFairy(true);
|
||||
// bannerInfos.add(0, bannerInfo);
|
||||
// }
|
||||
if (firstCharge) {
|
||||
BannerInfo bannerInfo = new BannerInfo();
|
||||
bannerInfo.setFirstCharge(true);
|
||||
|
@@ -81,7 +81,6 @@ import com.chwl.app.community.photo.BigPhotoActivity;
|
||||
import com.chwl.app.community.photo.PagerOption;
|
||||
import com.chwl.app.community.utils.ObjectTypeHelper;
|
||||
import com.chwl.app.treasure_box.widget.GoldBoxHelper;
|
||||
import com.chwl.app.treasurefairy.HomeFairyActivity;
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils;
|
||||
import com.chwl.app.ui.utils.ImageLoadUtilsV2;
|
||||
import com.chwl.app.ui.widget.DividerItemDecoration;
|
||||
@@ -1173,14 +1172,14 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
if (builder != null) {
|
||||
if (GoldBoxHelper.isShowFairy()) {
|
||||
builder.append(" 去參加!", new OriginalDrawStatusClickSpan(Color.parseColor("#FFBC51")) {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
HomeFairyActivity.start(mContext);
|
||||
}
|
||||
});
|
||||
}
|
||||
// if (GoldBoxHelper.isShowFairy()) {
|
||||
// builder.append(" 去參加!", new OriginalDrawStatusClickSpan(Color.parseColor("#FFBC51")) {
|
||||
// @Override
|
||||
// public void onClick(@NonNull View widget) {
|
||||
// HomeFairyActivity.start(mContext);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
tvContent.setOnClickListener(null);
|
||||
tvContent.setMovementMethod(new LinkMovementMethod());
|
||||
tvContent.setText(builder.build());
|
||||
|
@@ -79,8 +79,6 @@ import com.chwl.app.common.permission.PermissionActivity;
|
||||
import com.chwl.app.common.widget.StatusLayout;
|
||||
import com.chwl.app.common.widget.dialog.DialogManager;
|
||||
import com.chwl.app.common.widget.dialog.DialogUiHelper;
|
||||
import com.chwl.app.treasure_box.activity.TreasureBoxActivity;
|
||||
import com.chwl.app.treasurefairy.HomeFairyActivity;
|
||||
import com.chwl.app.ui.im.avtivity.NimP2PMessageActivity;
|
||||
import com.chwl.app.ui.login.AddUserInfoActivity;
|
||||
import com.chwl.app.ui.login.LoginCodeActivity;
|
||||
@@ -981,7 +979,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
case CUSTOM_MSG_HEADER_TYPE_GIFT:
|
||||
if (!isValid() || getWindow().getDecorView().getVisibility() != View.VISIBLE) return;
|
||||
if (this instanceof AddUserInfoActivity || this instanceof AVRoomActivity
|
||||
|| this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
// || this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
|| UserUtils.getUserInfo() == null)
|
||||
return;
|
||||
if (giftList == null) {
|
||||
@@ -1008,7 +1006,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
case CUSTOM_MSG_BOX://寻爱之旅
|
||||
if (!isValid() || getWindow().getDecorView().getVisibility() != View.VISIBLE) return;
|
||||
if (this instanceof AddUserInfoActivity || this instanceof AVRoomActivity
|
||||
|| this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
// || this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
|| UserUtils.getUserInfo() == null)
|
||||
return;
|
||||
if (playEffectList == null) {
|
||||
@@ -1037,7 +1035,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
case CustomAttachment.CUSTOM_MESS_TAROT:
|
||||
if (!isValid() || getWindow().getDecorView().getVisibility() != View.VISIBLE) return;
|
||||
if (this instanceof AddUserInfoActivity || this instanceof AVRoomActivity
|
||||
|| this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
// || this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
|| UserUtils.getUserInfo() == null)
|
||||
return;
|
||||
if (playEffectList == null) {
|
||||
@@ -1068,7 +1066,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
case CustomAttachment.CUSTOM_MSG_NOTIFY_H5:
|
||||
if (!isValid() || getWindow().getDecorView().getVisibility() != View.VISIBLE) return;
|
||||
if (this instanceof AddUserInfoActivity || this instanceof AVRoomActivity
|
||||
|| this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
// || this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
|| UserUtils.getUserInfo() == null)
|
||||
return;
|
||||
if (baseProtocol.getSecond() == CustomAttachment.CUSTOM_MSG_NOTIFY_H5_SUB_WHOLE_SERVICE) {
|
||||
@@ -1096,7 +1094,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
case CUSTOM_MSG_LUCKY_SEA://星级厨房
|
||||
if (!isValid() || getWindow().getDecorView().getVisibility() != View.VISIBLE) return;
|
||||
if (this instanceof AddUserInfoActivity || this instanceof AVRoomActivity
|
||||
|| this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
// || this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
|| UserUtils.getUserInfo() == null)
|
||||
return;
|
||||
if (playEffectList == null) {
|
||||
@@ -1125,7 +1123,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
case CUSTOM_MSG_LUCKY_GIFT://福袋
|
||||
if (!isValid() || getWindow().getDecorView().getVisibility() != View.VISIBLE) return;
|
||||
if (this instanceof AddUserInfoActivity || this instanceof AVRoomActivity
|
||||
|| this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
// || this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
|| UserUtils.getUserInfo() == null)
|
||||
return;
|
||||
if (playEffectList == null) {
|
||||
@@ -1154,7 +1152,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
case CUSTOM_MSG_FAIRY://夺宝精灵
|
||||
if (!isValid() || getWindow().getDecorView().getVisibility() != View.VISIBLE) return;
|
||||
if (this instanceof AddUserInfoActivity || this instanceof AVRoomActivity
|
||||
|| this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
// || this instanceof TreasureBoxActivity || this instanceof HomeFairyActivity
|
||||
|| UserUtils.getUserInfo() == null)
|
||||
return;
|
||||
if (playEffectList == null) {
|
||||
|
@@ -5,19 +5,15 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import com.netease.nim.uikit.support.glide.GlideApp
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.firstcharge.FirstChargeDialog
|
||||
import com.chwl.app.shipantics.PullRadishActivity
|
||||
import com.chwl.app.treasure_box.widget.GoldBoxHelper
|
||||
import com.chwl.app.treasurefairy.HomeFairyActivity
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils
|
||||
import com.chwl.app.ui.webview.room_banner.RoomBannerWebDialogActivity
|
||||
import com.chwl.app.ui.widget.rollviewpager.adapter.StaticPagerAdapter
|
||||
import com.chwl.app.utils.CommonJumpHelper
|
||||
import com.chwl.core.home.bean.BannerInfo
|
||||
import com.chwl.core.room.model.AvRoomModel
|
||||
import com.chwl.library.utils.config.BasicConfig
|
||||
import okhttp3.internal.filterList
|
||||
|
||||
class RoomActAdapter(private val mContext: Context, private val data: List<BannerInfo>) :
|
||||
@@ -28,15 +24,16 @@ class RoomActAdapter(private val mContext: Context, private val data: List<Banne
|
||||
val bannerInfo = data[position]
|
||||
val actId = bannerInfo.bannerId.toString()
|
||||
ivCover.scaleType = ImageView.ScaleType.CENTER_CROP
|
||||
if (bannerInfo.isFairy) {
|
||||
ivCover.setImageResource(R.drawable.ic_fairy_entrance)
|
||||
} else if (bannerInfo.isFirstCharge) {
|
||||
// if (bannerInfo.isFairy) {
|
||||
// ivCover.setImageResource(R.drawable.ic_fairy_entrance)
|
||||
// } else
|
||||
if (bannerInfo.isFirstCharge) {
|
||||
ivCover.setImageResource(R.drawable.ic_first_charge_enter)
|
||||
} else if (bannerInfo.isBox) {
|
||||
GlideApp.with(BasicConfig.INSTANCE.appContext)
|
||||
.load(GoldBoxHelper.getBoxIcon())
|
||||
.error(R.drawable.icon_room_treasure_box)
|
||||
.into(ivCover)
|
||||
// } else if (bannerInfo.isBox) {
|
||||
// GlideApp.with(BasicConfig.INSTANCE.appContext)
|
||||
// .load(GoldBoxHelper.getBoxIcon())
|
||||
// .error(R.drawable.icon_room_treasure_box)
|
||||
// .into(ivCover)
|
||||
} else if (bannerInfo.isRadish) {
|
||||
ivCover.setImageResource(R.drawable.ic_radish_entrance)
|
||||
} else {
|
||||
@@ -48,12 +45,13 @@ class RoomActAdapter(private val mContext: Context, private val data: List<Banne
|
||||
)
|
||||
}
|
||||
ivCover.setOnClickListener { v: View? ->
|
||||
if (bannerInfo.isFairy) {
|
||||
HomeFairyActivity.start(mContext)
|
||||
} else if (bannerInfo.isFirstCharge) {
|
||||
// if (bannerInfo.isFairy) {
|
||||
// HomeFairyActivity.start(mContext)
|
||||
// } else
|
||||
if (bannerInfo.isFirstCharge) {
|
||||
FirstChargeDialog.start(mContext)
|
||||
} else if (bannerInfo.isBox) {
|
||||
GoldBoxHelper.handleBoxClick(mContext)
|
||||
// } else if (bannerInfo.isBox) {
|
||||
// GoldBoxHelper.handleBoxClick(mContext)
|
||||
} else if (bannerInfo.isRadish) {
|
||||
PullRadishActivity.start(mContext)
|
||||
} else {
|
||||
|
@@ -1,572 +0,0 @@
|
||||
package com.chwl.app.treasurefairy
|
||||
|
||||
import android.util.SparseArray
|
||||
import androidx.core.util.forEach
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.chwl.app.base.BaseViewModel
|
||||
import com.chwl.app.base.Event
|
||||
import com.chwl.app.treasurefairy.event.UpdateDataEvent
|
||||
import com.chwl.app.treasurefairy.view.MyFairyItemView
|
||||
import com.chwl.core.bean.response.ListResult
|
||||
import com.chwl.core.gift.bean.SimpleUserInfo
|
||||
import com.chwl.core.treasurefairy.Compound
|
||||
import com.chwl.core.treasurefairy.DrawInfo
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
import com.chwl.core.treasurefairy.FairyResolveParam
|
||||
import com.chwl.core.treasurefairy.FairyTestParam
|
||||
import com.chwl.core.treasurefairy.ForestInfo
|
||||
import com.chwl.core.treasurefairy.MyFairyInfo
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
import com.chwl.core.treasurefairy.ResolveInfo
|
||||
import com.chwl.core.treasurefairy.SendFairyInfo
|
||||
import com.chwl.core.treasurefairy.TestFairyRecordInfo
|
||||
import com.chwl.core.treasurefairy.TreasureFairyModel
|
||||
import com.chwl.core.utils.net.ServerException
|
||||
import com.chwl.core.utils.toast
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
class FairyViewModel : BaseViewModel() {
|
||||
|
||||
private val _drawInfoLiveData = MutableLiveData<DrawInfo?>()
|
||||
val drawInfoLiveData: MutableLiveData<DrawInfo?> = _drawInfoLiveData
|
||||
|
||||
private val _prizeInfoListLiveData = MutableLiveData<List<PrizeInfo>?>()
|
||||
val prizeInfoListLiveData: MutableLiveData<List<PrizeInfo>?> = _prizeInfoListLiveData
|
||||
|
||||
private val _resultLiveData = MutableLiveData<Event<List<PrizeInfo>>?>()
|
||||
val resultLiveData: MutableLiveData<Event<List<PrizeInfo>>?> = _resultLiveData
|
||||
|
||||
private val _showGetKeyLiveData = MutableLiveData<Event<Boolean>>()
|
||||
val showGetKeyLiveData: LiveData<Event<Boolean>> = _showGetKeyLiveData
|
||||
|
||||
private val _drawForestLiveData = MutableLiveData<Event<List<PrizeInfo>>?>()
|
||||
val drawForestLiveData: MutableLiveData<Event<List<PrizeInfo>>?> = _drawForestLiveData
|
||||
|
||||
private val _forestInfoLiveData = MutableLiveData<ForestInfo?>()
|
||||
val forestInfoLiveData: MutableLiveData<ForestInfo?> = _forestInfoLiveData
|
||||
|
||||
private val _forestPoolLiveData = MutableLiveData<Pair<Int, List<PrizeInfo>?>?>()
|
||||
val forestPoolLiveData: MutableLiveData<Pair<Int, List<PrizeInfo>?>?> = _forestPoolLiveData
|
||||
|
||||
private val _forestRecordLiveData = MutableLiveData<ListResult<PrizeInfo>>()
|
||||
val forestRecordLiveData: LiveData<ListResult<PrizeInfo>> = _forestRecordLiveData
|
||||
|
||||
private val _myFairyInfoLiveData = MutableLiveData<MyFairyInfo?>()
|
||||
val myFairyInfoLiveData: MutableLiveData<MyFairyInfo?> = _myFairyInfoLiveData
|
||||
|
||||
private val _friendsListLiveData = MutableLiveData<List<SimpleUserInfo>?>()
|
||||
val friendsListLiveData: MutableLiveData<List<SimpleUserInfo>?> = _friendsListLiveData
|
||||
|
||||
private val _sendFairyLiveData = MutableLiveData<Event<Boolean>>()
|
||||
val sendFairyLiveData: LiveData<Event<Boolean>> = _sendFairyLiveData
|
||||
|
||||
private val _sendFairyRecordLiveData = MutableLiveData<ListResult<SendFairyInfo>>()
|
||||
val sendFairyRecordLiveData: LiveData<ListResult<SendFairyInfo>> = _sendFairyRecordLiveData
|
||||
|
||||
private val _compoundFairyInfosLiveData = MutableLiveData<SparseArray<FairyInfo>?>()
|
||||
val compoundFairyInfosLiveData: MutableLiveData<SparseArray<FairyInfo>?> =
|
||||
_compoundFairyInfosLiveData
|
||||
|
||||
private val _testResultLiveData = MutableLiveData<Event<FairyInfo>?>()
|
||||
val testResultLiveData: MutableLiveData<Event<FairyInfo>?> = _testResultLiveData
|
||||
|
||||
private val _testLegendResultLiveData = MutableLiveData<Event<FairyInfo>?>()
|
||||
val testLegendResultLiveData: MutableLiveData<Event<FairyInfo>?> = _testLegendResultLiveData
|
||||
|
||||
private val _resolveResultLiveData = MutableLiveData<Event<ResolveInfo>?>()
|
||||
val resolveResultLiveData: MutableLiveData<Event<ResolveInfo>?> = _resolveResultLiveData
|
||||
|
||||
private val _testRecordLiveData = MutableLiveData<ListResult<TestFairyRecordInfo>>()
|
||||
val testRecordLiveData: LiveData<ListResult<TestFairyRecordInfo>> = _testRecordLiveData
|
||||
|
||||
private val _exchangeGiftListLiveData = MutableLiveData<List<ExchangeGiftInfo>?>()
|
||||
val exchangeGiftListLiveData: MutableLiveData<List<ExchangeGiftInfo>?> =
|
||||
_exchangeGiftListLiveData
|
||||
|
||||
private val _exchangeGiftLiveData = MutableLiveData<Event<ExchangeGiftInfo>>()
|
||||
val exchangeGiftLiveData: LiveData<Event<ExchangeGiftInfo>> = _exchangeGiftLiveData
|
||||
|
||||
//精灵召唤列表
|
||||
private val _fairyCallInfoLiveData = MutableLiveData<List<ExchangeGiftInfo>?>()
|
||||
val fairyCallInfoLiveData: MutableLiveData<List<ExchangeGiftInfo>?> = _fairyCallInfoLiveData
|
||||
|
||||
private val _debrisExchangeListLiveData = MutableLiveData<List<ExchangeGiftInfo>?>()
|
||||
val debrisExchangeListLiveData: MutableLiveData<List<ExchangeGiftInfo>?> =
|
||||
_debrisExchangeListLiveData
|
||||
|
||||
private val _debrisExchangeLiveData = MutableLiveData<Event<ExchangeGiftInfo>>()
|
||||
val debrisExchangeLiveData: LiveData<Event<ExchangeGiftInfo>> = _debrisExchangeLiveData
|
||||
|
||||
private val _exchangeFairyRecordLiveData = MutableLiveData<ListResult<ExchangeGiftInfo>>()
|
||||
val exchangeFairyRecordLiveData: LiveData<ListResult<ExchangeGiftInfo>> =
|
||||
_exchangeFairyRecordLiveData
|
||||
|
||||
private val _exchangeDebrisRecordLiveData = MutableLiveData<ListResult<ExchangeGiftInfo>>()
|
||||
val exchangeDebrisRecordLiveData: LiveData<ListResult<ExchangeGiftInfo>> =
|
||||
_exchangeDebrisRecordLiveData
|
||||
|
||||
private val _buyDebrisLiveData = MutableLiveData<Event<Int>>()
|
||||
val buyDebrisLiveData: LiveData<Event<Int>> = _buyDebrisLiveData
|
||||
|
||||
init {
|
||||
initPrizeInfoList()
|
||||
}
|
||||
|
||||
fun initDrawInfo() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_drawInfoLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
_drawInfoLiveData.value = TreasureFairyModel.getDrawInfo()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun initPrizeInfoList() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_prizeInfoListLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
_prizeInfoListLiveData.value = TreasureFairyModel.getPrizeInfoList()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun drawFairy(drawNum: Int) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
if (it is ServerException && it.code == 211188) {
|
||||
_showGetKeyLiveData.value = Event(true)
|
||||
} else {
|
||||
it.message.toast()
|
||||
}
|
||||
_resultLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
val result = TreasureFairyModel.drawTreasureFairy(drawNum)
|
||||
_resultLiveData.value = result?.let { Event(it) }
|
||||
_drawInfoLiveData.value = TreasureFairyModel.getDrawInfo()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun drawForestFairy(drawNum: Int, poolLevel: Int) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
it.message.toast()
|
||||
_drawForestLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
val result = TreasureFairyModel.drawForestFairy(drawNum, poolLevel)
|
||||
_drawForestLiveData.value = result?.let { Event(it) }
|
||||
_forestInfoLiveData.value = TreasureFairyModel.getForestInfo()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun cleanDrawForestLiveData() {
|
||||
_drawForestLiveData.value = null
|
||||
}
|
||||
|
||||
fun getForestInfo() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_forestInfoLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
_forestInfoLiveData.value = TreasureFairyModel.getForestInfo()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun getForestPrizePool(poolLevel: Int) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_forestPoolLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
_forestPoolLiveData.value =
|
||||
Pair(poolLevel, TreasureFairyModel.getForestPrizePool(poolLevel))
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun getForestRecord(
|
||||
page: Int,
|
||||
pageSize: Int
|
||||
) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_forestRecordLiveData.value = ListResult.failed(page)
|
||||
},
|
||||
block = {
|
||||
val result = TreasureFairyModel.getForestRecord(page, pageSize)
|
||||
_forestRecordLiveData.value = ListResult.success(result, page)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun getMyFairyInfo() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_myFairyInfoLiveData.value = null
|
||||
it.message.toast()
|
||||
},
|
||||
block = {
|
||||
_myFairyInfoLiveData.value = TreasureFairyModel.getMyFairyInfo()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 精灵召唤列表
|
||||
*/
|
||||
fun getFairyCallInfo() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_myFairyInfoLiveData.value = null
|
||||
it.message.toast()
|
||||
},
|
||||
block = {
|
||||
_myFairyInfoLiveData.value = TreasureFairyModel.getMyFairyInfo()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun getFriendsList(nick: String? = null) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_friendsListLiveData.value = null
|
||||
it.message.toast()
|
||||
},
|
||||
block = {
|
||||
_friendsListLiveData.value = TreasureFairyModel.getFriendsList(nick)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
fun askForFairy(elfId: Long, targetUid: Long) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_sendFairyLiveData.value = Event(false)
|
||||
it.message.toast()
|
||||
},
|
||||
block = {
|
||||
TreasureFairyModel.askForFairy(elfId, targetUid)
|
||||
_sendFairyLiveData.value = Event(true)
|
||||
"已向好友發送索要信息".toast()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun sendFairy(elfId: Long, targetUid: Long) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_sendFairyLiveData.value = Event(false)
|
||||
it.message.toast()
|
||||
},
|
||||
block = {
|
||||
TreasureFairyModel.sendFairy(elfId, targetUid)
|
||||
_sendFairyLiveData.value = Event(true)
|
||||
"贈送成功!".toast()
|
||||
EventBus.getDefault().post(UpdateDataEvent())
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun getSendFairyList(
|
||||
page: Int,
|
||||
pageSize: Int
|
||||
) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_sendFairyRecordLiveData.value = ListResult.failed(page)
|
||||
},
|
||||
block = {
|
||||
val result = TreasureFairyModel.getSendFairyList(page, pageSize)
|
||||
_sendFairyRecordLiveData.value = ListResult.success(result, page)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun cleanTestParam() {
|
||||
_compoundFairyInfosLiveData.value = null
|
||||
_testLegendResultLiveData.value = null
|
||||
_testResultLiveData.value = null
|
||||
_resolveResultLiveData.value = null
|
||||
val myFairyInfo = _myFairyInfoLiveData.value
|
||||
myFairyInfo?.lowElves?.forEach {
|
||||
it.selectedNum = 0
|
||||
}
|
||||
myFairyInfo?.highElves?.forEach {
|
||||
it.selectedNum = 0
|
||||
}
|
||||
_myFairyInfoLiveData.value = myFairyInfo
|
||||
}
|
||||
|
||||
fun addTestFairy(fairyInfo: FairyInfo, size: Int) {
|
||||
val array = _compoundFairyInfosLiveData.value ?: SparseArray()
|
||||
|
||||
if (array.size() >= size) {
|
||||
"試煉爐已滿!".toast()
|
||||
} else {
|
||||
if (fairyInfo.elfNum == 0) {
|
||||
"你還未捕捉到該精靈".toast()
|
||||
return
|
||||
}
|
||||
var selectedNum = 0
|
||||
array.forEach { _, value ->
|
||||
if (value.elfId == fairyInfo.elfId) {
|
||||
selectedNum++
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedNum + 1 > fairyInfo.elfNum) {
|
||||
"精靈數量不足".toast()
|
||||
return
|
||||
}
|
||||
array.put(nextIndex(array), fairyInfo)
|
||||
|
||||
fairyInfo.selectedNum = selectedNum + 1
|
||||
|
||||
_compoundFairyInfosLiveData.value = array
|
||||
}
|
||||
}
|
||||
|
||||
fun minusTestFairy(index: Int) {
|
||||
val array = _compoundFairyInfosLiveData.value ?: SparseArray()
|
||||
val fairyInfo = array.get(index)
|
||||
if (fairyInfo != null) {
|
||||
array.remove(index)
|
||||
var selectedNum = 0
|
||||
array.forEach { _, value ->
|
||||
if (value.elfId == fairyInfo.elfId) {
|
||||
selectedNum++
|
||||
}
|
||||
}
|
||||
fairyInfo.selectedNum = selectedNum
|
||||
_compoundFairyInfosLiveData.value = array
|
||||
}
|
||||
}
|
||||
|
||||
fun oneKeyAdd(fairyInfos: List<FairyInfo>, size: Int) {
|
||||
val compoundFairyInfos = _compoundFairyInfosLiveData.value ?: SparseArray()
|
||||
var needNum = size - compoundFairyInfos.size()
|
||||
if (needNum == 0) {
|
||||
"試煉爐已滿!".toast()
|
||||
return
|
||||
}
|
||||
fairyInfos.forEach {
|
||||
while (it.elfNum - it.selectedNum > 0 && needNum > 0) {
|
||||
it.selectedNum++
|
||||
needNum--
|
||||
compoundFairyInfos.put(nextIndex(compoundFairyInfos), it)
|
||||
}
|
||||
}
|
||||
if (needNum <= size && needNum != 0) {
|
||||
"精靈數量不足".toast()
|
||||
return
|
||||
}
|
||||
_compoundFairyInfosLiveData.value = compoundFairyInfos
|
||||
}
|
||||
|
||||
private fun nextIndex(fairyInfos: SparseArray<FairyInfo>): Int {
|
||||
return when {
|
||||
fairyInfos.get(0) == null -> {
|
||||
0
|
||||
}
|
||||
fairyInfos.get(1) == null -> {
|
||||
1
|
||||
}
|
||||
fairyInfos.get(2) == null -> {
|
||||
2
|
||||
}
|
||||
fairyInfos.get(3) == null -> {
|
||||
3
|
||||
}
|
||||
else -> {
|
||||
4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun testFairy(level: Int): Boolean {
|
||||
val fairyInfos = _compoundFairyInfosLiveData.value ?: SparseArray()
|
||||
if (fairyInfos.size() != 5) {
|
||||
"精靈數量不足".toast()
|
||||
return false
|
||||
}
|
||||
safeLaunch(
|
||||
onError = {
|
||||
if (level == MyFairyItemView.LEGEND) {
|
||||
_testLegendResultLiveData.value = null
|
||||
} else {
|
||||
_testResultLiveData.value = null
|
||||
}
|
||||
|
||||
it.message.toast()
|
||||
},
|
||||
block = {
|
||||
val fairyTestParam = FairyTestParam()
|
||||
fairyInfos.forEach { _, value ->
|
||||
fairyTestParam.expendList.add(Compound(value.elfId, 1))
|
||||
}
|
||||
fairyTestParam.level = level
|
||||
val result = TreasureFairyModel.testFairy(fairyTestParam)
|
||||
(if (level == MyFairyItemView.LEGEND) {
|
||||
_testLegendResultLiveData
|
||||
} else {
|
||||
_testResultLiveData
|
||||
}).value = result?.let { Event(it) }
|
||||
getMyFairyInfo()
|
||||
}
|
||||
)
|
||||
return true
|
||||
}
|
||||
|
||||
fun resolveFairy(): Boolean {
|
||||
val fairyInfos = _compoundFairyInfosLiveData.value ?: SparseArray()
|
||||
if (fairyInfos.size() != 1) {
|
||||
"精靈數量不足".toast()
|
||||
return false
|
||||
}
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_resolveResultLiveData.value = null
|
||||
it.message.toast()
|
||||
},
|
||||
block = {
|
||||
val fairyTestParam = FairyResolveParam()
|
||||
fairyInfos.forEach { _, value ->
|
||||
fairyTestParam.expendList.add(Compound(value.elfId, 1))
|
||||
}
|
||||
val result = TreasureFairyModel.resolveFairy(fairyTestParam)
|
||||
_resolveResultLiveData.value = result?.let { Event(it[0]) }
|
||||
getMyFairyInfo()
|
||||
}
|
||||
)
|
||||
return true
|
||||
}
|
||||
|
||||
fun getTestFairyRecordList(
|
||||
page: Int,
|
||||
pageSize: Int
|
||||
) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_testRecordLiveData.value = ListResult.failed(page)
|
||||
},
|
||||
block = {
|
||||
val result = TreasureFairyModel.getTestFairyRecordList(page, pageSize)
|
||||
_testRecordLiveData.value = ListResult.success(result, page)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun getExchangeGiftInfoList() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_exchangeGiftListLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
val result = TreasureFairyModel.getExchangeGiftInfoList()
|
||||
_exchangeGiftListLiveData.value = result
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
//精灵召唤列表
|
||||
fun getFairyCallList() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_fairyCallInfoLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
val result = TreasureFairyModel.getFairyCallList()
|
||||
_fairyCallInfoLiveData.value = result
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun getDebrisExchangeList() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_debrisExchangeListLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
val result = TreasureFairyModel.getDebrisExchangeList()
|
||||
_debrisExchangeListLiveData.value = result
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun exchangeGift(itemId: Long) {
|
||||
safeLaunch {
|
||||
val result = TreasureFairyModel.exchangeGift(itemId)
|
||||
_exchangeGiftLiveData.value = result?.let { Event(it) }
|
||||
_myFairyInfoLiveData.value = TreasureFairyModel.getMyFairyInfo()
|
||||
}
|
||||
}
|
||||
|
||||
fun debrisExchange(itemId: Long) {
|
||||
safeLaunch {
|
||||
val result = TreasureFairyModel.exchangeGift(itemId)
|
||||
_debrisExchangeLiveData.value = result?.let { Event(it) }
|
||||
_myFairyInfoLiveData.value = TreasureFairyModel.getMyFairyInfo()
|
||||
initDrawInfo()
|
||||
}
|
||||
}
|
||||
|
||||
fun getExchangeFairyRecord(
|
||||
page: Int,
|
||||
pageSize: Int
|
||||
) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_exchangeFairyRecordLiveData.value = ListResult.failed(page)
|
||||
},
|
||||
block = {
|
||||
val result = TreasureFairyModel.getExchangeRecord(1, page, pageSize)
|
||||
_exchangeFairyRecordLiveData.value = ListResult.success(result, page)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun getExchangeDebrisRecord(
|
||||
page: Int,
|
||||
pageSize: Int
|
||||
) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_exchangeDebrisRecordLiveData.value = ListResult.failed(page)
|
||||
},
|
||||
block = {
|
||||
val result = TreasureFairyModel.getExchangeRecord(2, page, pageSize)
|
||||
_exchangeDebrisRecordLiveData.value = ListResult.success(result, page)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun buyDebris(num: Int, uid: String) {
|
||||
safeLaunch(
|
||||
block = {
|
||||
TreasureFairyModel.buyDebris(num, uid)
|
||||
|
||||
_drawInfoLiveData.value?.apply {
|
||||
this.drawTicketNum = this.drawTicketNum + num
|
||||
_drawInfoLiveData.value = this
|
||||
}
|
||||
|
||||
initDrawInfo()
|
||||
|
||||
_buyDebrisLiveData.value = Event(num)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@@ -1,571 +0,0 @@
|
||||
package com.chwl.app.treasurefairy
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.graphics.Path
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.view.*
|
||||
import android.view.animation.AnimationUtils
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.graphics.toColorInt
|
||||
import androidx.core.widget.doAfterTextChanged
|
||||
import com.alibaba.fastjson.JSON
|
||||
import com.hjq.toast.ToastUtils
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.netease.nimlib.sdk.chatroom.ChatRoomMessageBuilder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingActivity
|
||||
import com.chwl.app.common.widget.dialog.DialogManager
|
||||
import com.chwl.app.databinding.TreasureFairyDialogHomeBinding
|
||||
import com.chwl.app.treasure_box.activity.TreasureBoxActivity
|
||||
import com.chwl.app.treasurefairy.dialog.*
|
||||
import com.chwl.app.treasurefairy.view.CustomDrawable
|
||||
import com.chwl.app.ui.webview.FairyDialogWebViewActivity
|
||||
import com.chwl.app.utils.KeyBoardUtils
|
||||
import com.chwl.app.utils.SpannableBuilder
|
||||
import com.chwl.core.UriProvider
|
||||
import com.chwl.core.auth.AuthModel
|
||||
import com.chwl.core.bean.BaseProtocol
|
||||
import com.chwl.core.gift.bean.LuckyBagNoticeInfo
|
||||
import com.chwl.core.im.custom.bean.*
|
||||
import com.chwl.core.manager.AvRoomDataManager
|
||||
import com.chwl.core.manager.IMNetEaseManager
|
||||
import com.chwl.core.manager.RoomEvent
|
||||
import com.chwl.core.treasurefairy.DrawInfo
|
||||
import com.chwl.core.treasurefairy.FairyMsgInfoBean
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
import com.chwl.library.common.SpConstants
|
||||
import com.chwl.library.common.util.SPUtils
|
||||
import com.chwl.library.utils.FormatUtils
|
||||
import com.chwl.library.utils.SingleToastUtil
|
||||
import com.chwl.library.utils.TimeUtils
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
/**
|
||||
* author: wushaocheng
|
||||
* time: 2023/3/7
|
||||
* desc: 奪寶精靈
|
||||
*/
|
||||
class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding>() {
|
||||
private var selectIndex = 0
|
||||
private var targetIndex: Int = -1
|
||||
private val removeRunnable = Runnable { binding.llPrizeHint.removeAllViews() }
|
||||
private val hintPrizeCacheList = ArrayList<PrizeInfo>()
|
||||
|
||||
private var disposable: Disposable? = null
|
||||
private val viewModel: FairyViewModel by viewModels()
|
||||
|
||||
private var drawInfo: DrawInfo? = null
|
||||
|
||||
private var isCheck = false
|
||||
|
||||
private var mPrice = -1
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, HomeFairyActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
|
||||
private val fairyItems by lazy {
|
||||
listOf(
|
||||
binding.fairyItem0, binding.fairyItem1, binding.fairyItem2, binding.fairyItem3,
|
||||
binding.fairyItem4, binding.fairyItem5, binding.fairyItem6, binding.fairyItem7,
|
||||
binding.fairyItem8, binding.fairyItem9, binding.fairyItem10, binding.fairyItem11
|
||||
)
|
||||
}
|
||||
|
||||
override fun initBefore(savedInstanceState: Bundle?) {
|
||||
super.initBefore(savedInstanceState)
|
||||
//适配8.0和8.1不能同时设置屏幕固定方向和透明窗口背景的问题
|
||||
if (Build.VERSION.SDK_INT != Build.VERSION_CODES.O && Build.VERSION.SDK_INT != Build.VERSION_CODES.O_MR1) {
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun init() {
|
||||
//這裏的height用MATCH_PARENT狀態欄會被頂上去,不知道什麼鬼
|
||||
window.setLayout(
|
||||
WindowManager.LayoutParams.MATCH_PARENT,
|
||||
ScreenUtil.screenHeight - ScreenUtil.getStatusBarHeight(this)
|
||||
)
|
||||
window.setGravity(Gravity.BOTTOM)
|
||||
|
||||
binding.fairyItem0.isSelected = true
|
||||
looperHintPrize()
|
||||
|
||||
binding.viewPrice1.setOnClickListener {
|
||||
setFairyPriceSelect(1)
|
||||
}
|
||||
binding.viewPrice2.setOnClickListener {
|
||||
setFairyPriceSelect(2)
|
||||
}
|
||||
binding.viewPrice3.setOnClickListener {
|
||||
setFairyPriceSelect(3)
|
||||
}
|
||||
|
||||
binding.etQuantity.doAfterTextChanged {
|
||||
try {
|
||||
mPrice = it.toString().toInt()
|
||||
if (mPrice > TreasureBoxActivity.MAX_BUY_QUANTITY_LIMIT) {
|
||||
mPrice = TreasureBoxActivity.MAX_BUY_QUANTITY_LIMIT
|
||||
binding.etQuantity.setText(mPrice.toString())
|
||||
binding.etQuantity.setSelection(binding.etQuantity.text.length)
|
||||
SingleToastUtil.showToast(
|
||||
getString(
|
||||
R.string.treasure_box_activity_treasureboxactivity_01,
|
||||
TreasureBoxActivity.MAX_BUY_QUANTITY_LIMIT
|
||||
)
|
||||
)
|
||||
}
|
||||
setFairyPriceSelect(0)
|
||||
} catch (e: NumberFormatException) {
|
||||
e.printStackTrace()
|
||||
mPrice = -1
|
||||
}
|
||||
}
|
||||
|
||||
binding.tvBuy.setOnClickListener {
|
||||
if (mPrice < 1) {
|
||||
toast("請選擇購買的碎片數量")
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
val date = SPUtils.getLong(SpConstants.FAIRY_BUY_DEBRIS, 0L)
|
||||
if (TimeUtils.isToday(date)) {
|
||||
viewModel.buyDebris(
|
||||
mPrice,
|
||||
AuthModel.get().currentUid.toString()
|
||||
)
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
FairyBuyDebrisDialog.newInstance(mPrice).show(context)
|
||||
}
|
||||
|
||||
viewModel.buyDebrisLiveData.observe(this) {
|
||||
val date = SPUtils.getLong(SpConstants.FAIRY_BUY_SUCCESS, 0L)
|
||||
if (TimeUtils.isToday(date)) {
|
||||
ToastUtils.show("購買碎片成功")
|
||||
return@observe
|
||||
}
|
||||
|
||||
FairyBuySuccessDialog.newInstance(it.peekContent()).show(this)
|
||||
|
||||
}
|
||||
|
||||
binding.ivMyFairy.setOnClickListener {
|
||||
MyFairyDialog.newInstance().show(this)
|
||||
}
|
||||
binding.ivFairyStore.setOnClickListener {
|
||||
ExchangeFairyDialog.newInstance().show(context)
|
||||
}
|
||||
binding.ivOpen1.setOnClickListener {
|
||||
if (checkKeyNum(1)) {
|
||||
rotatePrize()
|
||||
viewModel.drawFairy(1)
|
||||
}
|
||||
|
||||
}
|
||||
binding.ivOpen10.setOnClickListener {
|
||||
if (checkKeyNum(10)) {
|
||||
rotatePrize()
|
||||
viewModel.drawFairy(10)
|
||||
}
|
||||
}
|
||||
|
||||
binding.ivOpen100.setOnClickListener {
|
||||
if (checkKeyNum(100)) {
|
||||
rotatePrize()
|
||||
viewModel.drawFairy(100)
|
||||
}
|
||||
}
|
||||
binding.rootView.setOnClickListener { finish() }
|
||||
binding.viewBg.setOnClickListener {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
binding.ivMore.setOnClickListener {
|
||||
val popupWindow = HomeMorePopupWindow(context)
|
||||
popupWindow.show(binding.ivMore, Gravity.BOTTOM or Gravity.CENTER_HORIZONTAL)
|
||||
}
|
||||
|
||||
binding.viewPrizeClick.setOnClickListener {
|
||||
if (disposable?.isDisposed == false && targetIndex != -1) {
|
||||
fairyItems[selectIndex].isSelected = false
|
||||
fairyItems[targetIndex].isSelected = true
|
||||
selectIndex = targetIndex
|
||||
targetIndex = -1
|
||||
HomePrizeDialog.newInstance().show(context)
|
||||
disposable?.dispose()
|
||||
}
|
||||
}
|
||||
|
||||
binding.cbWinResult.setOnCheckedChangeListener { _, isChecked ->
|
||||
isCheck = isChecked
|
||||
}
|
||||
|
||||
binding.viewBgLuckyValue.setOnClickListener {
|
||||
binding.ivRefresh.startAnimation(
|
||||
AnimationUtils.loadAnimation(
|
||||
this,
|
||||
R.anim.comm_loading
|
||||
)
|
||||
)
|
||||
viewModel.initDrawInfo()
|
||||
}
|
||||
|
||||
viewModel.prizeInfoListLiveData.observe(this) {
|
||||
it?.forEachIndexed { index, prizeInfo ->
|
||||
if (index < fairyItems.size) {
|
||||
fairyItems[index].setPrizeInfo(prizeInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.resultLiveData.observe(this) { event ->
|
||||
event?.getContentIfNotHandled()?.let {
|
||||
targetIndex = viewModel.prizeInfoListLiveData.value
|
||||
?.indexOfFirst { prize ->
|
||||
it[0].itemIndex == prize.itemIndex
|
||||
} ?: -2
|
||||
if (targetIndex >= fairyItems.size) {
|
||||
targetIndex = 0
|
||||
}
|
||||
if (targetIndex == -2) {
|
||||
viewModel.initPrizeInfoList()
|
||||
}
|
||||
hintPrizeCacheList.addAll(it.filter { prizeInfo -> prizeInfo.rewardLevel >= 3 })
|
||||
} ?: run {
|
||||
targetIndex = -1
|
||||
disposable?.dispose()
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.drawInfoLiveData.observe(this) {
|
||||
binding.ivRefresh.clearAnimation()
|
||||
|
||||
it?.let {
|
||||
drawInfo = it
|
||||
binding.tvKeyNum.text = FormatUtils.formatBigNum(it.drawTicketNum.toString())
|
||||
binding.tvCurrentLuckyValue.text = it.luckyNum.toString()
|
||||
|
||||
binding.tvShortLuckyValue.text =
|
||||
SpannableBuilder()
|
||||
.append("還差", ForegroundColorSpan("#59FDFF".toColorInt()))
|
||||
.append("${it.needLuckyNum}", ForegroundColorSpan("#FFE8AA".toColorInt()))
|
||||
.append(
|
||||
"幸運值,額外獲贈傳説精靈",
|
||||
ForegroundColorSpan("#59FDFF".toColorInt())
|
||||
)
|
||||
.build()
|
||||
binding.ivLuckyStone.post {
|
||||
val drawable =
|
||||
CustomDrawable(
|
||||
ContextCompat.getDrawable(
|
||||
this,
|
||||
R.drawable.treasure_fairy_ic_lucky_stone
|
||||
)!!
|
||||
)
|
||||
val path = Path()
|
||||
path.addRect(
|
||||
0f,
|
||||
0f,
|
||||
binding.ivLuckyStone.width.toFloat(),
|
||||
binding.ivLuckyStone.height *
|
||||
(1 - it.luckyNum / (it.luckyNum + it.needLuckyNum).toFloat()
|
||||
.coerceAtLeast(1f)),
|
||||
Path.Direction.CW
|
||||
)
|
||||
drawable.setSrcPath(path)
|
||||
binding.ivLuckyStone.setImageDrawable(drawable)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.showGetKeyLiveData.observe(this) {
|
||||
it.getContentIfNotHandled()?.let {
|
||||
DialogManager(context).showOkCancelDialog(
|
||||
"購買限時裝扮活動奪寶券",
|
||||
"去參与",
|
||||
"取消"
|
||||
) {
|
||||
FairyDialogWebViewActivity.start(context, UriProvider.getFairyKey())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setFairyPriceSelect(pos: Int) {
|
||||
if (pos == 0) {
|
||||
binding.viewPrice1.isSelected = false
|
||||
binding.viewPrice2.isSelected = false
|
||||
binding.viewPrice3.isSelected = false
|
||||
binding.ivDebris1.alpha = 0.4f
|
||||
binding.ivDebris2.alpha = 0.4f
|
||||
binding.ivDebris3.alpha = 0.4f
|
||||
binding.tvOne.alpha = 0.4f
|
||||
binding.tvTwo.alpha = 0.4f
|
||||
binding.tvThree.alpha = 0.4f
|
||||
return
|
||||
}
|
||||
|
||||
binding.etQuantity.text = null
|
||||
KeyBoardUtils.hideKeyBoard(this, binding.etQuantity)
|
||||
binding.etQuantity.clearFocus()
|
||||
|
||||
when (pos) {
|
||||
1 -> {
|
||||
mPrice = 1
|
||||
binding.viewPrice1.isSelected = true
|
||||
binding.viewPrice2.isSelected = false
|
||||
binding.viewPrice3.isSelected = false
|
||||
binding.ivDebris1.alpha = 1f
|
||||
binding.ivDebris2.alpha = 0.4f
|
||||
binding.ivDebris3.alpha = 0.4f
|
||||
binding.tvOne.alpha = 1f
|
||||
binding.tvTwo.alpha = 0.4f
|
||||
binding.tvThree.alpha = 0.4f
|
||||
}
|
||||
|
||||
2 -> {
|
||||
mPrice = 10
|
||||
binding.viewPrice1.isSelected = false
|
||||
binding.viewPrice2.isSelected = true
|
||||
binding.viewPrice3.isSelected = false
|
||||
binding.ivDebris1.alpha = 0.4f
|
||||
binding.ivDebris2.alpha = 1f
|
||||
binding.ivDebris3.alpha = 0.4f
|
||||
binding.tvOne.alpha = 0.4f
|
||||
binding.tvTwo.alpha = 1f
|
||||
binding.tvThree.alpha = 0.4f
|
||||
}
|
||||
|
||||
3 -> {
|
||||
mPrice = 100
|
||||
binding.viewPrice1.isSelected = false
|
||||
binding.viewPrice2.isSelected = false
|
||||
binding.viewPrice3.isSelected = true
|
||||
binding.ivDebris1.alpha = 0.4f
|
||||
binding.ivDebris2.alpha = 0.4f
|
||||
binding.ivDebris3.alpha = 1f
|
||||
binding.tvOne.alpha = 0.4f
|
||||
binding.tvTwo.alpha = 0.4f
|
||||
binding.tvThree.alpha = 1f
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkKeyNum(num: Int): Boolean {
|
||||
val keyNum = drawInfo?.drawTicketNum ?: 0
|
||||
if (keyNum >= num) {
|
||||
return true
|
||||
}
|
||||
FairyBuyDebrisModifyQuantityDialog.newInstance(num).show(this)
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
viewModel.initDrawInfo()
|
||||
}
|
||||
|
||||
private fun rotatePrize() {
|
||||
enabledOpenBtn(false)
|
||||
targetIndex = -1
|
||||
var minCount = 0
|
||||
disposable?.dispose()
|
||||
disposable = Observable.interval(70, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(bindToLifecycle())
|
||||
.doOnNext {
|
||||
fairyItems[selectIndex].isSelected = false
|
||||
selectIndex++
|
||||
minCount++
|
||||
if (selectIndex == fairyItems.size) selectIndex = 0
|
||||
if (targetIndex != -2) {
|
||||
fairyItems[selectIndex].isSelected = true
|
||||
}
|
||||
if ((selectIndex == targetIndex || targetIndex == -2) && minCount >= 24) {
|
||||
if (!isCheck) {
|
||||
HomePrizeDialog.newInstance().show(context)
|
||||
}
|
||||
disposable?.dispose()
|
||||
}
|
||||
}
|
||||
.doFinally { enabledOpenBtn(true) }
|
||||
.subscribe()
|
||||
}
|
||||
|
||||
private fun enabledOpenBtn(enable: Boolean) {
|
||||
binding.ivOpen1.isEnabled = enable
|
||||
binding.ivOpen10.isEnabled = enable
|
||||
binding.ivOpen100.isEnabled = enable
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private fun looperHintPrize() {
|
||||
Observable.interval(0, 250, TimeUnit.MILLISECONDS)
|
||||
.compose(bindToLifecycle())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.filter { hintPrizeCacheList.size > 0 }
|
||||
.subscribe(
|
||||
{
|
||||
addPrizeHintView(hintPrizeCacheList.removeAt(0))
|
||||
}) { looperHintPrize() } //出錯了繼續looper......
|
||||
}
|
||||
|
||||
private fun addPrizeHintView(prizeInfo: PrizeInfo) {
|
||||
binding.llPrizeHint.removeCallbacks(removeRunnable)
|
||||
binding.llPrizeHint.postDelayed(removeRunnable, 3000)
|
||||
val linearLayout =
|
||||
LayoutInflater.from(context)
|
||||
.inflate(R.layout.item_fairy_prize_hint, null) as LinearLayout
|
||||
val layoutParams =
|
||||
LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ScreenUtil.dip2px(25f))
|
||||
layoutParams.setMargins(0, 0, 0, ScreenUtil.dip2px(5f))
|
||||
linearLayout.layoutParams = layoutParams
|
||||
linearLayout.setBackgroundResource(R.drawable.treasure_fairy_bg_big_prize)
|
||||
linearLayout.setPadding(ScreenUtil.dip2px(10f), 0, ScreenUtil.dip2px(10f), 0)
|
||||
binding.llPrizeHint.addView(linearLayout)
|
||||
if (binding.llPrizeHint.childCount > 6) {
|
||||
binding.llPrizeHint.removeViewAt(0)
|
||||
}
|
||||
for (i in 0 until binding.llPrizeHint.childCount) {
|
||||
ObjectAnimator.ofFloat(
|
||||
binding.llPrizeHint.getChildAt(i),
|
||||
"translationY",
|
||||
ScreenUtil.dip2px(25f).toFloat(),
|
||||
0f
|
||||
)
|
||||
.setDuration(200)
|
||||
.start()
|
||||
}
|
||||
(linearLayout.findViewById<View>(R.id.tv_prize_name) as TextView).text =
|
||||
prizeInfo.rewardName
|
||||
(linearLayout.findViewById<View>(R.id.tv_prize_num) as TextView).text =
|
||||
"x" + prizeInfo.rewardNum
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收到全局广播信息
|
||||
*
|
||||
* @param body 信息实体
|
||||
*/
|
||||
override fun onReceivedNimBroadcastMessage(body: String?) {
|
||||
val baseProtocol: BaseProtocol<*> = try {
|
||||
JSON.parseObject(body, BaseProtocol::class.java)
|
||||
} catch (e: Exception) {
|
||||
null
|
||||
} ?: return
|
||||
when (baseProtocol.first) {
|
||||
CustomAttachment.CUSTOM_MSG_BOX -> if (baseProtocol.second == CustomAttachment.CUSTOM_MSG_SUB_BOX_ALL_ROOM_NOTIFY_BY_SVGA) {
|
||||
val roomBoxPrizeAttachment = RoomBoxPrizeAttachment(
|
||||
CustomAttachment.CUSTOM_MSG_BOX,
|
||||
CustomAttachment.CUSTOM_MSG_SUB_BOX_ALL_ROOM_NOTIFY_BY_SVGA
|
||||
)
|
||||
val roomBoxPrizeBean = JSON.parseObject(
|
||||
baseProtocol.data.toString(),
|
||||
RoomBoxPrizeInfo::class.java
|
||||
)
|
||||
roomBoxPrizeAttachment.uid = roomBoxPrizeBean.uid
|
||||
roomBoxPrizeAttachment.prizeName = roomBoxPrizeBean.prizeName
|
||||
roomBoxPrizeAttachment.nick = roomBoxPrizeBean.nick
|
||||
roomBoxPrizeAttachment.boxTypeStr = roomBoxPrizeBean.boxTypeStr
|
||||
roomBoxPrizeAttachment.roomUid = roomBoxPrizeBean.roomUid
|
||||
roomBoxPrizeAttachment.prizeNum = roomBoxPrizeBean.prizeNum
|
||||
roomBoxPrizeAttachment.userLevelLimit = roomBoxPrizeBean.userLevelLimit
|
||||
if (AvRoomDataManager.get().isOpenPureMode) {
|
||||
// 純凈模式打開後,僅能看跟自己相關的砸蛋消息
|
||||
if (roomBoxPrizeAttachment.uid == AuthModel.get().currentUid) {
|
||||
val message = ChatRoomMessageBuilder.createChatRoomCustomMessage(
|
||||
AvRoomDataManager.get().roomId.toString(),
|
||||
roomBoxPrizeAttachment
|
||||
)
|
||||
IMNetEaseManager.get().addMessages(message)
|
||||
}
|
||||
} else {
|
||||
val message = ChatRoomMessageBuilder.createChatRoomCustomMessage(
|
||||
AvRoomDataManager.get().roomId.toString(),
|
||||
roomBoxPrizeAttachment
|
||||
)
|
||||
IMNetEaseManager.get().addMessages(message)
|
||||
IMNetEaseManager.get().chatRoomEventObservable
|
||||
.onNext(
|
||||
RoomEvent()
|
||||
.setEvent(RoomEvent.BOX_NOTIFY_SVGA)
|
||||
.setChatRoomMessage(message)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
CustomAttachment.CUSTOM_MSG_LUCKY_SEA -> if (baseProtocol.second == CustomAttachment.CUSTOM_MSG_LUCKY_SEA_GIFT_SERVER_ALL) {
|
||||
val attachment = RoomLuckySeaAttachment(
|
||||
CustomAttachment.CUSTOM_MSG_LUCKY_SEA,
|
||||
CustomAttachment.CUSTOM_MSG_LUCKY_SEA_GIFT_SERVER_ALL
|
||||
)
|
||||
attachment.setRoomLuckySeaMsgBean(
|
||||
JSON.parseObject(
|
||||
baseProtocol.data.toString(),
|
||||
RoomLuckySeaMsgBean::class.java
|
||||
)
|
||||
)
|
||||
val message = ChatRoomMessageBuilder.createChatRoomCustomMessage(
|
||||
AvRoomDataManager.get().roomId.toString(),
|
||||
attachment
|
||||
)
|
||||
IMNetEaseManager.get().addMessages(message)
|
||||
IMNetEaseManager.get()
|
||||
.noticeRoomEvent(message, RoomEvent.LUCKY_SEA_GIFT_SERVER_NOTIFY)
|
||||
}
|
||||
|
||||
CustomAttachment.CUSTOM_MSG_LUCKY_GIFT -> if (baseProtocol.second == CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_NOTIFY || baseProtocol.second == CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_ALL) {
|
||||
val attachment =
|
||||
RoomReceivedLuckyGiftAttachment(CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_NOTIFY)
|
||||
attachment.luckyBagNoticeInfo = JSON.parseObject(
|
||||
baseProtocol.data.toString(),
|
||||
LuckyBagNoticeInfo::class.java
|
||||
)
|
||||
val message = ChatRoomMessageBuilder.createChatRoomCustomMessage(
|
||||
AvRoomDataManager.get().roomId.toString(),
|
||||
attachment
|
||||
)
|
||||
IMNetEaseManager.get().noticeServiceLuckyBagNotice(message)
|
||||
IMNetEaseManager.get().addMessages(message)
|
||||
}
|
||||
|
||||
CustomAttachment.CUSTOM_MSG_FAIRY -> if (baseProtocol.second == CustomAttachment.CUSTOM_MSG_SUB_DRAW_GIFT_L5) {
|
||||
val attachment = FairyMsgAttachment(
|
||||
CustomAttachment.CUSTOM_MSG_FAIRY,
|
||||
CustomAttachment.CUSTOM_MSG_SUB_DRAW_GIFT_L5
|
||||
)
|
||||
attachment.fairyMsgInfo = JSON.parseObject(
|
||||
baseProtocol.data.toString(),
|
||||
FairyMsgInfoBean::class.java
|
||||
)
|
||||
val message = ChatRoomMessageBuilder.createChatRoomCustomMessage(
|
||||
AvRoomDataManager.get().roomId.toString(),
|
||||
attachment
|
||||
)
|
||||
IMNetEaseManager.get().noticeRoomEvent(message, RoomEvent.FAIRY_DRAW_GIFT_L5)
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,20 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.ImageLoadUtilsV2
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
|
||||
class ExchangeDebrisAdapter :
|
||||
BaseQuickAdapter<ExchangeGiftInfo, BaseViewHolder>(R.layout.treasure_fairy_item_exchange_debris) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: ExchangeGiftInfo) {
|
||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_prize_icon), item.rewardPicUrl)
|
||||
helper.setText(R.id.tv_prize_name, item.getPrizeName())
|
||||
|
||||
helper.setText(R.id.tv_value, item.expendNum.toString())
|
||||
helper.addOnClickListener(R.id.tv_exchange)
|
||||
}
|
||||
|
||||
}
|
@@ -1,24 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class ExchangeDebrisRecordAdapter :
|
||||
BaseQuickAdapter<ExchangeGiftInfo, BaseViewHolder>(R.layout.treasure_fairy_item_exchange_debris_record) {
|
||||
|
||||
private val formatYear = SimpleDateFormat("yyyy-MM-dd", Locale.CHINA)
|
||||
private val formatHour = SimpleDateFormat("HH:mm:ss", Locale.CHINA)
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: ExchangeGiftInfo) {
|
||||
|
||||
helper.setText(R.id.tv_time_year, formatYear.format(item.createTime))
|
||||
helper.setText(R.id.tv_time_hour, formatHour.format(item.createTime))
|
||||
helper.setText(R.id.tv_prize_name, item.rewardName)
|
||||
helper.setText(R.id.tv_prize_num, item.getPrizeUnit())
|
||||
}
|
||||
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class ExchangeFairyRecordAdapter :
|
||||
BaseQuickAdapter<ExchangeGiftInfo, BaseViewHolder>(R.layout.treasure_fairy_item_exchange_fairy_record) {
|
||||
|
||||
private val formatYear = SimpleDateFormat("yyyy-MM-dd", Locale.CHINA)
|
||||
private val formatHour = SimpleDateFormat("HH:mm:ss", Locale.CHINA)
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: ExchangeGiftInfo) {
|
||||
|
||||
helper.setText(R.id.tv_time_year, formatYear.format(item.createTime))
|
||||
helper.setText(R.id.tv_time_hour, formatHour.format(item.createTime))
|
||||
helper.setText(R.id.tv_prize_name, "${item.rewardName}x${item.rewardNum}")
|
||||
}
|
||||
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.ImageLoadUtilsV2
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
|
||||
class ExchangeFairyResultAdapter :
|
||||
BaseQuickAdapter<ExchangeGiftInfo, BaseViewHolder>(R.layout.treasure_fairy_item_forest_prize_single) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: ExchangeGiftInfo) {
|
||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_prize_icon), item.rewardPicUrl)
|
||||
helper.setText(R.id.tv_prize_name, item.rewardName)
|
||||
}
|
||||
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.ImageLoadUtilsV2
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
import com.chwl.core.treasurefairy.PropItemInfo
|
||||
|
||||
class ExchangeSummonAdapter :
|
||||
BaseQuickAdapter<ExchangeGiftInfo, BaseViewHolder>(R.layout.treasure_fairy_item_exchange_summon) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: ExchangeGiftInfo) {
|
||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_prize_icon), item.rewardPicUrl)
|
||||
helper.setText(R.id.tv_prize_name, item.getPrizeName())
|
||||
|
||||
val adapter: BaseQuickAdapter<PropItemInfo, BaseViewHolder> =
|
||||
object : BaseQuickAdapter<PropItemInfo, BaseViewHolder>(R.layout.item_exchange_debris) {
|
||||
override fun convert(helper: BaseViewHolder, item: PropItemInfo) {
|
||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_icon), item.picUrl)
|
||||
helper.setText(R.id.tv_num, "${item.propName}x${item.propNum}")
|
||||
}
|
||||
}
|
||||
helper.getView<RecyclerView>(R.id.mRecyclerView).adapter = adapter
|
||||
item.propItems?.let {
|
||||
adapter.setNewData(it)
|
||||
}
|
||||
|
||||
helper.addOnClickListener(R.id.tv_exchange)
|
||||
}
|
||||
|
||||
}
|
@@ -1,96 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.Gravity;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.ui.widget.XRecyclerView.ScaleTransitionPagerTitleView;
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ForestIndicatorAdapter extends CommonNavigatorAdapter {
|
||||
private final Context mContext;
|
||||
private final List<? extends CharSequence> mTitleList;
|
||||
|
||||
private int textSize = 15;
|
||||
private float minScale = 1f;
|
||||
private OnItemSelectListener mOnItemSelectListener;
|
||||
|
||||
public ForestIndicatorAdapter(Context context, List<? extends CharSequence> charSequences) {
|
||||
this.mContext = context;
|
||||
this.mTitleList = charSequences;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mTitleList == null ? 0 : mTitleList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerTitleView getTitleView(Context context, final int i) {
|
||||
ScaleTransitionPagerTitleView scaleTransitionPagerTitleView = new ScaleTransitionPagerTitleView(context, true);
|
||||
scaleTransitionPagerTitleView.setNormalColor(ContextCompat.getColor(context, R.color.white));
|
||||
scaleTransitionPagerTitleView.setSelectedColor(ContextCompat.getColor(context, R.color.white));
|
||||
scaleTransitionPagerTitleView.setMinScale(minScale);
|
||||
scaleTransitionPagerTitleView.setTextSize(textSize);
|
||||
int padding = UIUtil.dip2px(context, 12);
|
||||
scaleTransitionPagerTitleView.setPadding(padding, 0, padding, 0);
|
||||
scaleTransitionPagerTitleView.setText(mTitleList.get(i));
|
||||
scaleTransitionPagerTitleView.setOnClickListener(view -> {
|
||||
if (mOnItemSelectListener != null) {
|
||||
mOnItemSelectListener.onItemSelect(i, scaleTransitionPagerTitleView);
|
||||
}
|
||||
|
||||
});
|
||||
return scaleTransitionPagerTitleView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerIndicator getIndicator(Context context) {
|
||||
LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||
indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
|
||||
indicator.setLineHeight(UIUtil.dip2px(mContext, 4));
|
||||
indicator.setRoundRadius(UIUtil.dip2px(mContext, 2));
|
||||
indicator.setLineWidth(UIUtil.dip2px(mContext, 60));
|
||||
indicator.setColors(Color.parseColor("#69FFEB"),Color.parseColor("#EAFF89"));
|
||||
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
lp.gravity = Gravity.BOTTOM;
|
||||
indicator.setLayoutParams(lp);
|
||||
return indicator;
|
||||
}
|
||||
|
||||
public int getTextSize() {
|
||||
return textSize;
|
||||
}
|
||||
|
||||
public void setTextSize(int textSize) {
|
||||
this.textSize = textSize;
|
||||
}
|
||||
|
||||
public float getMinScale() {
|
||||
return minScale;
|
||||
}
|
||||
|
||||
public void setMinScale(float minScale) {
|
||||
this.minScale = minScale;
|
||||
}
|
||||
|
||||
public void setOnItemSelectListener(OnItemSelectListener onItemSelectListener) {
|
||||
mOnItemSelectListener = onItemSelectListener;
|
||||
}
|
||||
|
||||
public interface OnItemSelectListener {
|
||||
void onItemSelect(int position, TextView view);
|
||||
}
|
||||
}
|
@@ -1,24 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import android.widget.ImageView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
|
||||
class ForestPrizeAdapter(val isSingle: Boolean = false) :
|
||||
BaseQuickAdapter<PrizeInfo, BaseViewHolder>(
|
||||
if (isSingle) {
|
||||
R.layout.treasure_fairy_item_forest_prize_single
|
||||
} else {
|
||||
R.layout.treasure_fairy_item_forest_prize
|
||||
}
|
||||
) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: PrizeInfo) {
|
||||
helper.getView<ImageView>(R.id.iv_prize_icon).load(item.rewardPicUrl)
|
||||
helper.setText(R.id.tv_prize_name, "${item.rewardName}x${item.rewardNum}")
|
||||
}
|
||||
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import android.widget.ImageView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
|
||||
class ForestPrizesChildAdapter :
|
||||
BaseQuickAdapter<PrizeInfo, BaseViewHolder>(R.layout.treasure_fairy_item_forest_prizes_child) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: PrizeInfo) {
|
||||
helper.getView<ImageView>(R.id.iv_prize_icon).load(item.rewardPicUrl)
|
||||
helper.setText(R.id.tv_prize_name, item.rewardName)
|
||||
}
|
||||
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class ForestPrizesRecordAdapter :
|
||||
BaseQuickAdapter<PrizeInfo, BaseViewHolder>(R.layout.treasure_fairy_item_forest_prizes_record) {
|
||||
|
||||
private val formatYear = SimpleDateFormat("yyyy-MM-dd", Locale.CHINA)
|
||||
private val formatHour = SimpleDateFormat("HH:mm:ss", Locale.CHINA)
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: PrizeInfo) {
|
||||
|
||||
helper.setText(R.id.tv_time_year, formatYear.format(item.drawTime))
|
||||
helper.setText(R.id.tv_time_hour, formatHour.format(item.drawTime))
|
||||
helper.setText(R.id.tv_prize_name, "${item.rewardName}x${item.rewardNum}")
|
||||
helper.setText(
|
||||
R.id.tv_prize_type, when (item.poolLevel) {
|
||||
1 -> mContext.getString(R.string.fairy_primary_forest)
|
||||
2 -> mContext.getString(R.string.fairy_epic_forest)
|
||||
else -> mContext.getString(R.string.fairy_legend_forest)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import android.widget.ImageView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
|
||||
class HomePrizeAdapter(val isSingle: Boolean = false) :
|
||||
BaseQuickAdapter<PrizeInfo, BaseViewHolder>(
|
||||
if (isSingle) {
|
||||
R.layout.treasure_fairy_item_home_prize_single
|
||||
} else {
|
||||
R.layout.treasure_fairy_item_home_prize
|
||||
}
|
||||
) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: PrizeInfo) {
|
||||
helper.getView<ImageView>(R.id.iv_prize_icon).load(item.rewardPicUrl)
|
||||
helper.setText(R.id.tv_prize_num, "x${item.rewardNum}")
|
||||
helper.setText(R.id.tv_prize_name, item.rewardName)
|
||||
}
|
||||
|
||||
}
|
@@ -1,20 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import android.widget.ImageView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.gift.bean.SimpleUserInfo
|
||||
import com.chwl.core.utils.ifNullOrEmpty
|
||||
|
||||
class MyFairyFriendsAdapter :
|
||||
BaseQuickAdapter<SimpleUserInfo, BaseViewHolder>(R.layout.treasure_fairy_item_my_fairy_friend) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: SimpleUserInfo) {
|
||||
helper.getView<ImageView>(R.id.iv_avatar).load(item.avatar)
|
||||
helper.setText(R.id.tv_nickname, item.nick)
|
||||
helper.setText(R.id.tv_desc, item.userDesc.ifNullOrEmpty { mContext.getString(R.string.fairy_default_signature) })
|
||||
}
|
||||
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import android.widget.ImageView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.SendFairyInfo
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class MyFairyRecordAdapter :
|
||||
BaseQuickAdapter<SendFairyInfo, BaseViewHolder>(R.layout.treasure_fairy_item_my_fairy_record) {
|
||||
|
||||
private val format = SimpleDateFormat("yyyy年MM月dd日 HH時mm分ss秒", Locale.CHINA)
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: SendFairyInfo) {
|
||||
helper.getView<ImageView>(R.id.iv_fairy_icon).load(item.elfPicUrl)
|
||||
helper.setText(R.id.tv_record_time, format.format(item.createTime))
|
||||
val isSend = item.type == 2
|
||||
helper.setText(
|
||||
R.id.tv_content,
|
||||
"${if (isSend) "你" else item.targetNick}贈送${if (isSend) item.targetNick else "了你"}一張“${item.elfName}”精靈卡"
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import android.widget.ImageView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
import java.util.*
|
||||
|
||||
class ResolveFairyAdapter :
|
||||
BaseQuickAdapter<FairyInfo, BaseViewHolder>(R.layout.treasure_fairy_item_resolve_fairy) {
|
||||
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: FairyInfo) {
|
||||
helper.getView<ImageView>(R.id.iv_fairy_icon).load(item.elfPicUrl)
|
||||
helper.setText(R.id.tv_fairy_num, "${item.selectedNum}/${item.elfNum}")
|
||||
helper.setText(R.id.tv_fairy_name, item.elfName)
|
||||
helper.setBackgroundRes(
|
||||
R.id.ll_root,
|
||||
if (item.selectedNum > 0) R.drawable.treasure_fairy_bg_test_fairy_item_select else 0
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.core.treasurefairy.ResolveInfo
|
||||
|
||||
class ResolveFairyResultAdapter :
|
||||
BaseQuickAdapter<ResolveInfo, BaseViewHolder>(R.layout.treasure_fairy_item_forest_prize_single_resolve) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: ResolveInfo) {
|
||||
helper.setText(R.id.tv_prize_name, "x${item.pieceNum}")
|
||||
}
|
||||
|
||||
}
|
@@ -1,25 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import android.widget.ImageView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
import java.util.*
|
||||
|
||||
class TestFairyAdapter :
|
||||
BaseQuickAdapter<FairyInfo, BaseViewHolder>(R.layout.treasure_fairy_item_test_fairy) {
|
||||
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: FairyInfo) {
|
||||
helper.getView<ImageView>(R.id.iv_fairy_icon).load(item.elfPicUrl)
|
||||
helper.setText(R.id.tv_fairy_num, "${item.selectedNum}/${item.elfNum}")
|
||||
helper.setText(R.id.tv_fairy_name, item.elfName)
|
||||
helper.setBackgroundRes(
|
||||
R.id.ll_root,
|
||||
if (item.selectedNum > 0) R.drawable.treasure_fairy_bg_test_fairy_item_select else 0
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.core.treasurefairy.TestFairyRecordInfo
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class TestFairyRecordAdapter :
|
||||
BaseQuickAdapter<TestFairyRecordInfo, BaseViewHolder>(R.layout.treasure_fairy_item_test_fairy_record) {
|
||||
|
||||
private val formatYear = SimpleDateFormat("yyyy-MM-dd", Locale.CHINA)
|
||||
private val formatHour = SimpleDateFormat("HH:mm:ss", Locale.CHINA)
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: TestFairyRecordInfo) {
|
||||
|
||||
helper.setText(R.id.tv_time_year, formatYear.format(item.createTime))
|
||||
helper.setText(R.id.tv_time_hour, formatHour.format(item.createTime))
|
||||
helper.setText(R.id.tv_prize_name, item.elfName)
|
||||
helper.setText(
|
||||
R.id.tv_prize_type, when (item.type) {
|
||||
4 -> "傳說試煉"
|
||||
7 -> "精靈分解"
|
||||
else -> "傳說試煉"
|
||||
}
|
||||
)
|
||||
|
||||
helper.setText(
|
||||
R.id.tv_fairy_infos,
|
||||
item.expendList.joinToString(separator = "\n") { "${it.elfName}x${it.elfNum}" })
|
||||
}
|
||||
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.adapter
|
||||
|
||||
import android.widget.ImageView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
|
||||
class TestFairyResultAdapter :
|
||||
BaseQuickAdapter<FairyInfo, BaseViewHolder>(R.layout.treasure_fairy_item_forest_prize_single) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: FairyInfo) {
|
||||
helper.getView<ImageView>(R.id.iv_prize_icon).load(item.elfPicUrl)
|
||||
helper.setText(R.id.tv_prize_name, item.elfName)
|
||||
}
|
||||
|
||||
}
|
@@ -1,68 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.adapter.RoomVPAdapter
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogExchangeBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.fragment.ExchangeDebrisFragment
|
||||
import com.chwl.app.treasurefairy.fragment.ExchangeFairyFragment
|
||||
import com.chwl.app.treasurefairy.fragment.ExchangeSummonFragment
|
||||
|
||||
class ExchangeFairyDialog : BaseDialog<TreasureFairyDialogExchangeBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var gravity = Gravity.BOTTOM
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ExchangeFairyDialog {
|
||||
val args = Bundle()
|
||||
val fragment = ExchangeFairyDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding.ivBack.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
binding.tvRecord.setOnClickListener {
|
||||
ExchangeRecordDialog.newInstance().show(context)
|
||||
}
|
||||
binding.rg.setOnCheckedChangeListener { _, checkedId ->
|
||||
when (checkedId) {
|
||||
R.id.rb_epic -> binding.viewPager.currentItem = 0
|
||||
R.id.rb_legend -> binding.viewPager.currentItem = 1
|
||||
}
|
||||
}
|
||||
binding.viewPager.addOnPageChangeListener(object : ViewPager.SimpleOnPageChangeListener() {
|
||||
override fun onPageSelected(position: Int) {
|
||||
when (position) {
|
||||
0 -> binding.rg.check(R.id.rb_epic)
|
||||
1 -> binding.rg.check(R.id.rb_legend)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
binding.viewPager.adapter = RoomVPAdapter(
|
||||
childFragmentManager,
|
||||
listOf(
|
||||
ExchangeSummonFragment.newInstance(),
|
||||
ExchangeDebrisFragment.newInstance()
|
||||
)
|
||||
)
|
||||
viewModel.getMyFairyInfo()
|
||||
viewModel.cleanTestParam()
|
||||
}
|
||||
|
||||
}
|
@@ -1,59 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogTestFairyResultBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.ExchangeFairyResultAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
|
||||
class ExchangeFairyResultDialog : BaseDialog<TreasureFairyDialogTestFairyResultBinding>() {
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<ExchangeGiftInfo>
|
||||
private lateinit var prizeAdapter: ExchangeFairyResultAdapter
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ExchangeFairyResultDialog {
|
||||
val args = Bundle()
|
||||
val fragment = ExchangeFairyResultDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding?.tvClose?.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
val prizeInfoList = viewModel.exchangeGiftLiveData.value
|
||||
if (prizeInfoList == null) {
|
||||
dismissAllowingStateLoss()
|
||||
return
|
||||
}
|
||||
|
||||
prizeAdapter = ExchangeFairyResultAdapter()
|
||||
rvDelegate = RVDelegate.Builder<ExchangeGiftInfo>()
|
||||
.setAdapter(prizeAdapter)
|
||||
.setRecyclerView(binding?.recyclerView)
|
||||
.setLayoutManager(
|
||||
LinearLayoutManager(context)
|
||||
)
|
||||
.build()
|
||||
|
||||
rvDelegate.setNewData(arrayListOf(prizeInfoList.peekContent()))
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,59 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.adapter.RoomVPAdapter
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogExchangeRecordBinding
|
||||
import com.chwl.app.treasurefairy.fragment.ExchangeDebrisRecordFragment
|
||||
import com.chwl.app.treasurefairy.fragment.ExchangeFairyRecordFragment
|
||||
|
||||
class ExchangeRecordDialog : BaseDialog<TreasureFairyDialogExchangeRecordBinding>() {
|
||||
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ExchangeRecordDialog {
|
||||
val args = Bundle()
|
||||
val fragment = ExchangeRecordDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding?.rootView?.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
binding?.rg?.setOnCheckedChangeListener { _, checkedId ->
|
||||
when (checkedId) {
|
||||
R.id.rb_prizes -> binding?.viewPager?.currentItem = 0
|
||||
R.id.rb_record -> binding?.viewPager?.currentItem = 1
|
||||
}
|
||||
}
|
||||
binding?.viewPager?.addOnPageChangeListener(object : ViewPager.SimpleOnPageChangeListener() {
|
||||
override fun onPageSelected(position: Int) {
|
||||
when (position) {
|
||||
0 -> binding?.rg?.check(R.id.rb_prizes)
|
||||
1 -> binding?.rg?.check(R.id.rb_record)
|
||||
}
|
||||
}
|
||||
})
|
||||
binding?.viewPager?.adapter = RoomVPAdapter(
|
||||
childFragmentManager,
|
||||
listOf(
|
||||
ExchangeFairyRecordFragment.newInstance(),
|
||||
ExchangeDebrisRecordFragment.newInstance()
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@@ -1,65 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogBuyDebrisBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.core.auth.AuthModel
|
||||
import com.chwl.core.manager.AvRoomDataManager
|
||||
import com.chwl.library.common.SpConstants
|
||||
import com.chwl.library.common.util.SPUtils
|
||||
|
||||
/**
|
||||
* 购买碎片
|
||||
*/
|
||||
class FairyBuyDebrisDialog : BaseDialog<TreasureFairyDialogBuyDebrisBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
companion object {
|
||||
fun newInstance(num: Int): FairyBuyDebrisDialog {
|
||||
val args = Bundle()
|
||||
args.putInt("num", num)
|
||||
val fragment = FairyBuyDebrisDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val num by lazy { requireArguments().getInt("num") }
|
||||
private val price by lazy { AvRoomDataManager.get().mSeizeTreasureSwitchVo?.price ?: 0 }
|
||||
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding.tvDebrisNum.text = getString(R.string.buy_debris, num)
|
||||
binding.tvPrizeName.text = (num * price).toString()
|
||||
|
||||
binding.cbPay.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
SPUtils.putLong(SpConstants.FAIRY_BUY_DEBRIS, System.currentTimeMillis())
|
||||
} else {
|
||||
SPUtils.putLong(SpConstants.FAIRY_BUY_DEBRIS, 0L)
|
||||
}
|
||||
}
|
||||
|
||||
binding.tvBuy.setOnClickListener {
|
||||
viewModel.buyDebris(num, AuthModel.get().currentUid.toString())
|
||||
}
|
||||
|
||||
viewModel.buyDebrisLiveData.observe(this) {
|
||||
it.getContentIfNotHandled()?.let {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,102 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.core.widget.doAfterTextChanged
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogBuyDebrisModifyQuantityBinding
|
||||
import com.chwl.app.treasure_box.activity.TreasureBoxActivity
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.core.auth.AuthModel
|
||||
import com.chwl.core.manager.AvRoomDataManager
|
||||
import com.chwl.core.utils.StringUtils
|
||||
import com.chwl.library.utils.SingleToastUtil
|
||||
|
||||
/**
|
||||
* 购买碎片
|
||||
*/
|
||||
class FairyBuyDebrisModifyQuantityDialog :
|
||||
BaseDialog<TreasureFairyDialogBuyDebrisModifyQuantityBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
companion object {
|
||||
fun newInstance(num: Int): FairyBuyDebrisModifyQuantityDialog {
|
||||
val args = Bundle()
|
||||
args.putInt("num", num)
|
||||
val fragment = FairyBuyDebrisModifyQuantityDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private var num = 0
|
||||
private val price by lazy { AvRoomDataManager.get().mSeizeTreasureSwitchVo?.price ?: 0 }
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
num = requireArguments().getInt("num")
|
||||
|
||||
binding.etNum.setText(num.toString())
|
||||
binding.tvPrizeName.text = (num * price).toString()
|
||||
|
||||
binding.ivDecrease.setOnClickListener {
|
||||
num = (num - 10).coerceAtLeast(1)
|
||||
binding.etNum.setText(num.toString())
|
||||
binding.etNum.setSelection(num.toString().length)
|
||||
binding.tvPrizeName.text = (num * price).toString()
|
||||
}
|
||||
|
||||
binding.ivIncrease.setOnClickListener {
|
||||
num = (num + 10).coerceAtMost(200)
|
||||
binding.etNum.setText(num.toString())
|
||||
binding.etNum.setSelection(num.toString().length)
|
||||
binding.tvPrizeName.text = (num * price).toString()
|
||||
}
|
||||
|
||||
binding.etNum.doAfterTextChanged {
|
||||
var n = StringUtils.toInt(binding.etNum.text.toString(), 0)
|
||||
|
||||
if (n < 1) {
|
||||
binding.etNum.setText("1")
|
||||
binding.etNum.setSelection(1)
|
||||
num = 1
|
||||
return@doAfterTextChanged
|
||||
}
|
||||
|
||||
if (n > TreasureBoxActivity.MAX_BUY_QUANTITY_LIMIT) {
|
||||
n = TreasureBoxActivity.MAX_BUY_QUANTITY_LIMIT
|
||||
binding.etNum.setText(n.toString())
|
||||
binding.etNum.setSelection(n.toString().length)
|
||||
SingleToastUtil.showToast(
|
||||
getString(
|
||||
R.string.treasure_box_activity_treasureboxactivity_01,
|
||||
TreasureBoxActivity.MAX_BUY_QUANTITY_LIMIT
|
||||
)
|
||||
)
|
||||
}
|
||||
binding.tvPrizeName.text = (n * price).toString()
|
||||
num = n
|
||||
}
|
||||
|
||||
|
||||
binding.tvBuy.setOnClickListener {
|
||||
viewModel.buyDebris(num, AuthModel.get().currentUid.toString())
|
||||
}
|
||||
|
||||
viewModel.buyDebrisLiveData.observe(this) {
|
||||
it.getContentIfNotHandled()?.let {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,48 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogBuySuccessBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.library.common.SpConstants
|
||||
import com.chwl.library.common.util.SPUtils
|
||||
|
||||
/**
|
||||
* 购买碎片成功
|
||||
*/
|
||||
class FairyBuySuccessDialog : BaseDialog<TreasureFairyDialogBuySuccessBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
|
||||
companion object {
|
||||
fun newInstance(num: Int): FairyBuySuccessDialog {
|
||||
val args = Bundle()
|
||||
args.putSerializable("num", num)
|
||||
val fragment = FairyBuySuccessDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val num by lazy { requireArguments().getInt("num") }
|
||||
|
||||
@SuppressLint("CheckResult", "SetTextI18n")
|
||||
override fun init() {
|
||||
binding.tvDebrisNum.text = "x${num}"
|
||||
|
||||
binding.cbPay.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
if (isChecked) {
|
||||
SPUtils.putLong(SpConstants.FAIRY_BUY_SUCCESS, System.currentTimeMillis())
|
||||
} else {
|
||||
SPUtils.putLong(SpConstants.FAIRY_BUY_SUCCESS, 0L)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,176 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogForestBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.ui.utils.loadAvatar
|
||||
import com.chwl.core.utils.subAndReplaceDot
|
||||
import com.chwl.core.utils.toIntOrDef
|
||||
import com.chwl.core.utils.toast
|
||||
|
||||
class ForestFairyDialog : BaseDialog<TreasureFairyDialogForestBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var gravity = Gravity.BOTTOM
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
private var currentType = 1
|
||||
|
||||
private val showResultRunnable = Runnable {
|
||||
if (canShowResult) {
|
||||
canShowResult = false
|
||||
enabledOpenBtn(true)
|
||||
ForestPrizeDialog.newInstance().show(context)
|
||||
} else {
|
||||
resultNotShowed = true
|
||||
}
|
||||
}
|
||||
private var canShowResult = false
|
||||
private var resultNotShowed = false
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ForestFairyDialog {
|
||||
val args = Bundle()
|
||||
val fragment = ForestFairyDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
|
||||
const val BASE = 1
|
||||
const val EPIC = 2
|
||||
const val LEGEND = 3
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding?.ivBack?.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
binding?.ivRecord?.setOnClickListener {
|
||||
ForestRecordDialog.newInstance().show(context)
|
||||
}
|
||||
binding?.ivMyFairy?.setOnClickListener {
|
||||
MyFairyDialog.newInstance().show(context)
|
||||
}
|
||||
binding?.ivFairyTest?.setOnClickListener {
|
||||
TestFairyDialog.newInstance().show(context)
|
||||
}
|
||||
binding?.ivFairyStore?.setOnClickListener {
|
||||
ExchangeFairyDialog.newInstance().show(context)
|
||||
}
|
||||
|
||||
binding?.ivPrevious?.setOnClickListener {
|
||||
currentType--
|
||||
switchType()
|
||||
}
|
||||
binding?.ivNext?.setOnClickListener {
|
||||
currentType++
|
||||
switchType()
|
||||
}
|
||||
binding?.viewBgGrab1?.setOnClickListener {
|
||||
if (checkBallNum(1)) {
|
||||
enabledOpenBtn(false)
|
||||
binding?.animView?.startPlay(requireContext().assets, "vap/fairy_anim_once.mp4")
|
||||
binding?.animView?.postDelayed(showResultRunnable, 1900)
|
||||
viewModel.drawForestFairy(1, currentType)
|
||||
}
|
||||
}
|
||||
|
||||
binding?.viewBgGrab10?.setOnClickListener {
|
||||
if (checkBallNum(10)) {
|
||||
enabledOpenBtn(false)
|
||||
binding?.animView?.startPlay(requireContext().assets, "vap/fairy_anim_ten.mp4")
|
||||
binding?.animView?.postDelayed(showResultRunnable, 1900)
|
||||
viewModel.drawForestFairy(10, currentType)
|
||||
}
|
||||
}
|
||||
|
||||
binding?.animView?.setOnClickListener {
|
||||
if (canShowResult) {
|
||||
binding?.animView?.removeCallbacks(showResultRunnable)
|
||||
showResultRunnable.run()
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.drawForestLiveData.observe(viewLifecycleOwner) {
|
||||
it?.getContentIfNotHandled()?.let {
|
||||
canShowResult = true
|
||||
if (resultNotShowed) {
|
||||
showResultRunnable.run()
|
||||
}
|
||||
} ?: run {
|
||||
enabledOpenBtn(true)
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.getForestInfo()
|
||||
|
||||
viewModel.forestInfoLiveData.observe(viewLifecycleOwner) {
|
||||
it?.let {
|
||||
binding?.ivAvatar?.loadAvatar(it.avatar)
|
||||
binding?.tvNickname?.text = it.nick.subAndReplaceDot(7)
|
||||
binding?.tvKeyNumBase?.text = it.lowBallNum
|
||||
binding?.tvKeyNumEpic?.text = it.middleBallNum
|
||||
binding?.tvKeyNumLegend?.text = it.highBallNum
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun checkBallNum(openNum: Int): Boolean {
|
||||
val ballNum = viewModel.forestInfoLiveData.value?.let {
|
||||
when (currentType) {
|
||||
BASE -> it.lowBallNum.toIntOrDef(0)
|
||||
EPIC -> it.middleBallNum.toIntOrDef(0)
|
||||
else -> it.highBallNum.toIntOrDef(0)
|
||||
}
|
||||
} ?: 0
|
||||
return if (ballNum >= openNum) {
|
||||
true
|
||||
} else {
|
||||
"精靈球數量不足".toast()
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private fun enabledOpenBtn(enable: Boolean) {
|
||||
binding?.viewBgGrab1?.isEnabled = enable
|
||||
binding?.viewBgGrab10?.isEnabled = enable
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun switchType() {
|
||||
when (currentType) {
|
||||
BASE -> {
|
||||
binding?.ivPrevious?.isInvisible = true
|
||||
binding?.tvGrabText1?.text = "(初級球X1)"
|
||||
binding?.tvGrabText10?.text = "(初級球X10)"
|
||||
binding?.tvTips?.text = "使用初級球有一定幾率抓到初級精靈"
|
||||
binding?.viewBgForestBase?.setBackgroundResource(R.drawable.treasure_fairy_bg_forest_base)
|
||||
}
|
||||
EPIC -> {
|
||||
binding?.ivNext?.isInvisible = false
|
||||
binding?.ivPrevious?.isInvisible = false
|
||||
binding?.tvGrabText1?.text = "(超級球X1)"
|
||||
binding?.tvGrabText10?.text = "(超級球X10)"
|
||||
binding?.tvTips?.text = "使用超級球有一定幾率抓到史詩精靈"
|
||||
binding?.viewBgForestBase?.setBackgroundResource(R.drawable.treasure_fairy_bg_forest_epic)
|
||||
}
|
||||
LEGEND -> {
|
||||
binding?.ivNext?.isInvisible = true
|
||||
binding?.tvGrabText1?.text = "(大師球X1)"
|
||||
binding?.tvGrabText10?.text = "(大師球X10)"
|
||||
binding?.tvTips?.text = "使用大師球必定抓到傳說精靈"
|
||||
binding?.viewBgForestBase?.setBackgroundResource(R.drawable.treasure_fairy_bg_forest_legend)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,86 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogForestPrizeBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.ForestPrizeAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
|
||||
class ForestPrizeDialog : BaseDialog<TreasureFairyDialogForestPrizeBinding>() {
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<PrizeInfo>
|
||||
private lateinit var prizeAdapter: ForestPrizeAdapter
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
companion object {
|
||||
fun newInstance(isFairy: Boolean = false): ForestPrizeDialog {
|
||||
val args = Bundle()
|
||||
args.putBoolean("isFairy", isFairy)
|
||||
val fragment = ForestPrizeDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding?.tvClose?.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
val prizeInfoList = viewModel.drawForestLiveData.value?.peekContent()
|
||||
if (prizeInfoList.isNullOrEmpty()) return
|
||||
val isSingle = prizeInfoList.size == 1
|
||||
val hasSurprise = prizeInfoList.find { it.propType == 1 } != null
|
||||
val isFairy =
|
||||
requireArguments().getBoolean("isFairy", true) || !hasSurprise
|
||||
if (isFairy) {
|
||||
viewModel.cleanDrawForestLiveData()
|
||||
}
|
||||
binding?.tvTitle?.text = if (isFairy) "恭喜獲得" else "意外發現"
|
||||
if (!isFairy && !isSingle && hasSurprise) {
|
||||
newInstance(true).show(context)
|
||||
}
|
||||
|
||||
val showPrizeInfoList =
|
||||
prizeInfoList.filter { if (isFairy) (it.propType != 1) else (it.propType == 1) }
|
||||
val isShowDateSingle = showPrizeInfoList.size == 1
|
||||
if (!isShowDateSingle) {
|
||||
binding?.viewBg?.updateLayoutParams {
|
||||
width = ScreenUtil.dip2px(318f)
|
||||
height = ScreenUtil.dip2px(383f)
|
||||
}
|
||||
binding?.viewBg?.setBackgroundResource(R.drawable.treasure_fairy_bg_forest_prize)
|
||||
}
|
||||
prizeAdapter = ForestPrizeAdapter(isShowDateSingle)
|
||||
rvDelegate = RVDelegate.Builder<PrizeInfo>()
|
||||
.setAdapter(prizeAdapter)
|
||||
.setRecyclerView(binding?.recyclerView)
|
||||
.setLayoutManager(
|
||||
if (isShowDateSingle) {
|
||||
LinearLayoutManager(context)
|
||||
} else {
|
||||
GridLayoutManager(context, 3, LinearLayoutManager.VERTICAL, false)
|
||||
}
|
||||
)
|
||||
.build()
|
||||
|
||||
rvDelegate.setNewData(showPrizeInfoList)
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,59 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.adapter.RoomVPAdapter
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogForestRecordBinding
|
||||
import com.chwl.app.treasurefairy.fragment.ForestPrizesFragment
|
||||
import com.chwl.app.treasurefairy.fragment.ForestRecordFragment
|
||||
|
||||
class ForestRecordDialog : BaseDialog<TreasureFairyDialogForestRecordBinding>() {
|
||||
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ForestRecordDialog {
|
||||
val args = Bundle()
|
||||
val fragment = ForestRecordDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding?.rootView?.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
binding?.rg?.setOnCheckedChangeListener { _, checkedId ->
|
||||
when (checkedId) {
|
||||
R.id.rb_prizes -> binding?.viewPager?.currentItem = 0
|
||||
R.id.rb_record -> binding?.viewPager?.currentItem = 1
|
||||
}
|
||||
}
|
||||
binding?.viewPager?.addOnPageChangeListener(object : ViewPager.SimpleOnPageChangeListener() {
|
||||
override fun onPageSelected(position: Int) {
|
||||
when (position) {
|
||||
0 -> binding?.rg?.check(R.id.rb_prizes)
|
||||
1 -> binding?.rg?.check(R.id.rb_record)
|
||||
}
|
||||
}
|
||||
})
|
||||
binding?.viewPager?.adapter = RoomVPAdapter(
|
||||
childFragmentManager,
|
||||
listOf(
|
||||
ForestPrizesFragment.newInstance(),
|
||||
ForestRecordFragment.newInstance(),
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.view.View
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.ui.webview.FairyDialogWebViewActivity
|
||||
import com.chwl.core.UriProvider
|
||||
import razerdp.basepopup.BasePopupWindow
|
||||
|
||||
class HomeMorePopupWindow(private val context: Context) : BasePopupWindow(context) {
|
||||
|
||||
init {
|
||||
contentView = createPopupById(R.layout.treasure_fairy_popup_window_home_more)
|
||||
setOutSideDismiss(true)
|
||||
setBackgroundColor(Color.TRANSPARENT)
|
||||
setPopupAnimationStyle(-1)
|
||||
findViewById<View>(R.id.tv_rule).setOnClickListener {
|
||||
FairyDialogWebViewActivity.start(context, UriProvider.getFairyRule())
|
||||
dismiss()
|
||||
}
|
||||
findViewById<View>(R.id.tv_record).setOnClickListener {
|
||||
FairyDialogWebViewActivity.start(context, UriProvider.getFairyRecord())
|
||||
dismiss()
|
||||
}
|
||||
findViewById<View>(R.id.tv_rank).setOnClickListener {
|
||||
FairyDialogWebViewActivity.start(context, UriProvider.getFairySuperior())
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
fun show(anchor: View?, popupGravity: Int) {
|
||||
setPopupGravity(popupGravity)
|
||||
showPopupWindow(anchor)
|
||||
}
|
||||
|
||||
}
|
@@ -1,58 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogHomePrizeBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.HomePrizeAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
|
||||
class HomePrizeDialog : BaseDialog<TreasureFairyDialogHomePrizeBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var gravity = Gravity.BOTTOM
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<PrizeInfo>
|
||||
private lateinit var prizeAdapter: HomePrizeAdapter
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
companion object {
|
||||
fun newInstance(): HomePrizeDialog {
|
||||
val args = Bundle()
|
||||
val fragment = HomePrizeDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding.rootView.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
val prizeInfoList = viewModel.resultLiveData.value?.peekContent()
|
||||
if (prizeInfoList.isNullOrEmpty()) return
|
||||
val isSingle = prizeInfoList.size == 1
|
||||
prizeAdapter = HomePrizeAdapter(isSingle)
|
||||
rvDelegate = RVDelegate.Builder<PrizeInfo>()
|
||||
.setAdapter(prizeAdapter)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setLayoutManager(
|
||||
if (isSingle) {
|
||||
LinearLayoutManager(context)
|
||||
} else {
|
||||
GridLayoutManager(context, 4, LinearLayoutManager.VERTICAL, false)
|
||||
}
|
||||
)
|
||||
.build()
|
||||
rvDelegate.setNewData(prizeInfoList)
|
||||
}
|
||||
|
||||
}
|
@@ -1,89 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.adapter.RoomVPAdapter
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogMyFairyBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.event.UpdateDataEvent
|
||||
import com.chwl.app.treasurefairy.fragment.MyFairyFragment
|
||||
import com.chwl.app.treasurefairy.view.MyFairyItemView
|
||||
import com.chwl.core.DemoCache
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
|
||||
class MyFairyDialog : BaseDialog<TreasureFairyDialogMyFairyBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var gravity = Gravity.BOTTOM
|
||||
|
||||
companion object {
|
||||
fun newInstance(): MyFairyDialog {
|
||||
val args = Bundle()
|
||||
val fragment = MyFairyDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
EventBus.getDefault().register(this)
|
||||
|
||||
binding.ivBack.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
binding.ivFairyTest.setOnClickListener {
|
||||
TestFairyDialog.newInstance().show(context)
|
||||
}
|
||||
binding.ivRecord.setOnClickListener {
|
||||
MyFairyRecordDialog.newInstance().show(context)
|
||||
}
|
||||
binding.rg.setOnCheckedChangeListener { _, checkedId ->
|
||||
when (checkedId) {
|
||||
R.id.rb_base -> binding.viewPager.currentItem = 0
|
||||
R.id.rb_legend -> binding.viewPager.currentItem = 1
|
||||
}
|
||||
}
|
||||
binding.viewPager.addOnPageChangeListener(object : ViewPager.SimpleOnPageChangeListener() {
|
||||
override fun onPageSelected(position: Int) {
|
||||
when (position) {
|
||||
0 -> binding.rg.check(R.id.rb_base)
|
||||
1 -> binding.rg.check(R.id.rb_legend)
|
||||
}
|
||||
DemoCache.saveMyFairyIndex(position)
|
||||
}
|
||||
})
|
||||
binding.viewPager.adapter = RoomVPAdapter(
|
||||
childFragmentManager,
|
||||
listOf(
|
||||
MyFairyFragment.newInstance(MyFairyItemView.BASE),
|
||||
MyFairyFragment.newInstance(MyFairyItemView.LEGEND)
|
||||
)
|
||||
)
|
||||
|
||||
binding.viewPager.setCurrentItem(DemoCache.readMyFairyIndex(), false)
|
||||
|
||||
viewModel.getMyFairyInfo()
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onUpdateDataEvent(event: UpdateDataEvent?) {
|
||||
viewModel.getMyFairyInfo()
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
|
||||
}
|
@@ -1,68 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.TreasureFairyDialogMyFairyRecordBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.MyFairyRecordAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.SendFairyInfo
|
||||
|
||||
class MyFairyRecordDialog : BaseDialog<TreasureFairyDialogMyFairyRecordBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var gravity = Gravity.CENTER
|
||||
|
||||
companion object {
|
||||
fun newInstance(): MyFairyRecordDialog {
|
||||
val args = Bundle()
|
||||
val fragment = MyFairyRecordDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private var page = 1
|
||||
private val pageSize = 20
|
||||
private lateinit var rvDelegate: RVDelegate<SendFairyInfo>
|
||||
private lateinit var recordAdapter: MyFairyRecordAdapter
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
|
||||
recordAdapter = MyFairyRecordAdapter()
|
||||
rvDelegate = RVDelegate.Builder<SendFairyInfo>()
|
||||
.setAdapter(recordAdapter)
|
||||
.setRecyclerView(binding?.recyclerView)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyTextViewNoImage(
|
||||
context,
|
||||
getString(R.string.fairy_no_further_data_is_available)
|
||||
)
|
||||
)
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.build()
|
||||
|
||||
viewModel.sendFairyRecordLiveData.observe(viewLifecycleOwner) {
|
||||
rvDelegate.loadData(it)
|
||||
}
|
||||
|
||||
recordAdapter.setOnLoadMoreListener({ loadData(false) }, binding?.recyclerView)
|
||||
|
||||
loadData(true)
|
||||
}
|
||||
|
||||
private fun loadData(isRefresh: Boolean) {
|
||||
page = if (isRefresh) 1 else (page + 1)
|
||||
viewModel.getSendFairyList(page, pageSize)
|
||||
}
|
||||
|
||||
}
|
@@ -1,62 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.core.widget.doAfterTextChanged
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogMyFairySearchFriendBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.MyFairyFriendsAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.gift.bean.SimpleUserInfo
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
|
||||
class MyFairySearchFriendsDialog : BaseDialog<TreasureFairyDialogMyFairySearchFriendBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var gravity = Gravity.BOTTOM
|
||||
|
||||
companion object {
|
||||
fun newInstance(fairyInfo: FairyInfo, isSend: Boolean): MyFairySearchFriendsDialog {
|
||||
val args = Bundle()
|
||||
args.putSerializable("fairyInfo", fairyInfo)
|
||||
args.putBoolean("isSend", isSend)
|
||||
val fragment = MyFairySearchFriendsDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<SimpleUserInfo>
|
||||
private lateinit var friendsAdapter: MyFairyFriendsAdapter
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding?.ivBack?.setOnClickListener { dismissAllowingStateLoss() }
|
||||
friendsAdapter = MyFairyFriendsAdapter()
|
||||
rvDelegate = RVDelegate.Builder<SimpleUserInfo>()
|
||||
.setAdapter(friendsAdapter)
|
||||
.setRecyclerView(binding?.recyclerView)
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.build()
|
||||
friendsAdapter.setOnItemClickListener { _, _, position ->
|
||||
friendsAdapter.getItem(position)?.let {
|
||||
MyFairySendDialog.newInstance(requireArguments(), it).show(context)
|
||||
}
|
||||
}
|
||||
viewModel.getFriendsList()
|
||||
viewModel.friendsListLiveData.observe(viewLifecycleOwner) {
|
||||
rvDelegate.setNewData(it)
|
||||
}
|
||||
binding?.editSearch?.doAfterTextChanged {
|
||||
viewModel.getFriendsList(it?.toString())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,82 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.core.graphics.toColorInt
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogMyFairySendBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.app.utils.SpannableBuilder
|
||||
import com.chwl.core.gift.bean.SimpleUserInfo
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
import com.chwl.library.common.util.ClickUtils.clickWithTrigger
|
||||
|
||||
class MyFairySendDialog : BaseDialog<TreasureFairyDialogMyFairySendBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var gravity = Gravity.CENTER
|
||||
private var onSendListener: (() -> Unit)? = null
|
||||
|
||||
companion object {
|
||||
fun newInstance(bundle: Bundle, userInfo: SimpleUserInfo): MyFairySendDialog {
|
||||
val args = Bundle()
|
||||
args.putSerializable("userInfo", userInfo)
|
||||
args.putAll(bundle)
|
||||
val fragment = MyFairySendDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
private val userInfo by lazy { requireArguments().getSerializable("userInfo") as SimpleUserInfo }
|
||||
private val fairyInfo by lazy { requireArguments().getSerializable("fairyInfo") as FairyInfo }
|
||||
private val isSend by lazy { requireArguments().getBoolean("isSend") }
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
|
||||
binding?.ivFairyIcon?.load(fairyInfo.elfPicUrl)
|
||||
binding?.tvContent?.text =
|
||||
SpannableBuilder()
|
||||
.append(if (isSend) "確定贈送" else "確定向", ForegroundColorSpan(Color.WHITE))
|
||||
.append("“${userInfo.nick}”", ForegroundColorSpan("#FEF8AA".toColorInt()))
|
||||
.append(
|
||||
"${if (isSend) "" else "索要"}1張“${fairyInfo.elfName}”精靈卡嗎?",
|
||||
ForegroundColorSpan(Color.WHITE)
|
||||
)
|
||||
.build()
|
||||
binding?.tvSend?.text = if (isSend) "贈 送" else "索 要"
|
||||
binding?.tvClose?.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
binding?.tvSend?.clickWithTrigger{
|
||||
binding?.tvSend?.isEnabled = false
|
||||
if (isSend) {
|
||||
viewModel.sendFairy(fairyInfo.elfId, userInfo.uid)
|
||||
} else {
|
||||
viewModel.askForFairy(fairyInfo.elfId, userInfo.uid)
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.sendFairyLiveData.observe(viewLifecycleOwner) {
|
||||
binding?.tvSend?.isEnabled = true
|
||||
if (it.getContentIfNotHandled() == true) {
|
||||
dismissAllowingStateLoss()
|
||||
onSendListener?.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun setOnSendListener(onSendListener: () -> Nothing) {
|
||||
this.onSendListener = onSendListener
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogResolveFairyResultBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.ResolveFairyResultAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.ResolveInfo
|
||||
|
||||
class ResolveFairyResultDialog : BaseDialog<TreasureFairyDialogResolveFairyResultBinding>() {
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<ResolveInfo>
|
||||
private lateinit var prizeAdapter: ResolveFairyResultAdapter
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
companion object {
|
||||
fun newInstance(resolveInfo: ResolveInfo): ResolveFairyResultDialog {
|
||||
val args = Bundle()
|
||||
args.putSerializable("resolveInfo",resolveInfo)
|
||||
val fragment = ResolveFairyResultDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val resolveInfo by lazy { requireArguments().getSerializable("resolveInfo") as ResolveInfo }
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding.tvClose.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
prizeAdapter = ResolveFairyResultAdapter()
|
||||
rvDelegate = RVDelegate.Builder<ResolveInfo>()
|
||||
.setAdapter(prizeAdapter)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setLayoutManager(
|
||||
LinearLayoutManager(context)
|
||||
)
|
||||
.build()
|
||||
|
||||
rvDelegate.setNewData(arrayListOf(resolveInfo))
|
||||
viewModel.cleanTestParam()
|
||||
viewModel.initDrawInfo()
|
||||
}
|
||||
|
||||
}
|
@@ -1,68 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.avroom.adapter.RoomVPAdapter
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogTestFairyBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.fragment.TestFairyFragment
|
||||
import com.chwl.app.treasurefairy.view.MyFairyItemView
|
||||
|
||||
class TestFairyDialog : BaseDialog<TreasureFairyDialogTestFairyBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var gravity = Gravity.BOTTOM
|
||||
|
||||
companion object {
|
||||
fun newInstance(): TestFairyDialog {
|
||||
val args = Bundle()
|
||||
val fragment = TestFairyDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding.ivBack.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
binding.tvRecord.setOnClickListener {
|
||||
TestFairyRecordDialog.newInstance().show(context)
|
||||
}
|
||||
binding.rg.setOnCheckedChangeListener { _, checkedId ->
|
||||
when (checkedId) {
|
||||
R.id.rb_epic -> binding.viewPager.currentItem = 0
|
||||
R.id.rb_legend -> binding.viewPager.currentItem = 1
|
||||
}
|
||||
}
|
||||
binding.viewPager.addOnPageChangeListener(object : ViewPager.SimpleOnPageChangeListener() {
|
||||
override fun onPageSelected(position: Int) {
|
||||
when (position) {
|
||||
0 -> binding.rg.check(R.id.rb_epic)
|
||||
1 -> binding.rg.check(R.id.rb_legend)
|
||||
}
|
||||
viewModel.cleanTestParam()
|
||||
}
|
||||
})
|
||||
|
||||
binding.viewPager.adapter = RoomVPAdapter(
|
||||
childFragmentManager,
|
||||
listOf(
|
||||
TestFairyFragment.newInstance(MyFairyItemView.BASE),
|
||||
TestFairyFragment.newInstance(MyFairyItemView.LEGEND)
|
||||
)
|
||||
)
|
||||
viewModel.getMyFairyInfo()
|
||||
viewModel.cleanTestParam()
|
||||
}
|
||||
|
||||
}
|
@@ -1,67 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.TreasureFairyDialogTestFairyRecordBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.TestFairyRecordAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.TestFairyRecordInfo
|
||||
|
||||
class TestFairyRecordDialog : BaseDialog<TreasureFairyDialogTestFairyRecordBinding>() {
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(): TestFairyRecordDialog {
|
||||
val args = Bundle()
|
||||
val fragment = TestFairyRecordDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private var page = 1
|
||||
private val pageSize = 20
|
||||
private lateinit var rvDelegate: RVDelegate<TestFairyRecordInfo>
|
||||
private lateinit var prizeAdapter: TestFairyRecordAdapter
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
override var width: Int = ScreenUtil.dip2px(318f)
|
||||
override var height: Int = ScreenUtil.dip2px(388f)
|
||||
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
prizeAdapter = TestFairyRecordAdapter()
|
||||
rvDelegate = RVDelegate.Builder<TestFairyRecordInfo>()
|
||||
.setAdapter(prizeAdapter)
|
||||
.setPageSize(pageSize)
|
||||
.setRecyclerView(binding?.recyclerView)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyTextViewNoImage(
|
||||
context,
|
||||
getString(R.string.fairy_no_further_data_is_available)
|
||||
)
|
||||
)
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.build()
|
||||
|
||||
viewModel.testRecordLiveData.observe(viewLifecycleOwner) {
|
||||
rvDelegate.loadData(it)
|
||||
}
|
||||
|
||||
prizeAdapter.setOnLoadMoreListener({ loadData(false) }, binding?.recyclerView)
|
||||
|
||||
loadData(true)
|
||||
}
|
||||
|
||||
private fun loadData(isRefresh: Boolean) {
|
||||
page = if (isRefresh) 1 else (page + 1)
|
||||
viewModel.getTestFairyRecordList(page, pageSize)
|
||||
}
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.base.BaseDialog
|
||||
import com.chwl.app.databinding.TreasureFairyDialogTestFairyResultBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.TestFairyResultAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
|
||||
class TestFairyResultDialog : BaseDialog<TreasureFairyDialogTestFairyResultBinding>() {
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<FairyInfo>
|
||||
private lateinit var prizeAdapter: TestFairyResultAdapter
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
companion object {
|
||||
fun newInstance(fairyInfo: FairyInfo): TestFairyResultDialog {
|
||||
val args = Bundle()
|
||||
args.putSerializable("fairyInfo",fairyInfo)
|
||||
val fragment = TestFairyResultDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val fairyInfo by lazy { requireArguments().getSerializable("fairyInfo") as FairyInfo }
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding.tvClose.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
prizeAdapter = TestFairyResultAdapter()
|
||||
rvDelegate = RVDelegate.Builder<FairyInfo>()
|
||||
.setAdapter(prizeAdapter)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setLayoutManager(
|
||||
LinearLayoutManager(context)
|
||||
)
|
||||
.build()
|
||||
|
||||
rvDelegate.setNewData(arrayListOf(fairyInfo))
|
||||
viewModel.cleanTestParam()
|
||||
}
|
||||
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.event;
|
||||
|
||||
/**
|
||||
* 更新我的精灵数据
|
||||
* Created by wushaocheng on 2023/3/13.
|
||||
*/
|
||||
public class UpdateDataEvent {
|
||||
}
|
@@ -1,86 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.TreasureFairyFragmentExchangeDebrisBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.ExchangeDebrisAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.app.ui.utils.loadAvatar
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
import com.chwl.core.user.UserModel
|
||||
import com.chwl.core.utils.subAndReplaceDot
|
||||
import com.chwl.core.utils.toast
|
||||
|
||||
class ExchangeDebrisFragment :
|
||||
BaseViewBindingFragment<TreasureFairyFragmentExchangeDebrisBinding>() {
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ExchangeDebrisFragment {
|
||||
val args = Bundle()
|
||||
val fragment = ExchangeDebrisFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
private lateinit var rvDelegate: RVDelegate<ExchangeGiftInfo>
|
||||
private lateinit var debrisAdapter: ExchangeDebrisAdapter
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
debrisAdapter = ExchangeDebrisAdapter()
|
||||
rvDelegate = RVDelegate.Builder<ExchangeGiftInfo>()
|
||||
.setAdapter(debrisAdapter)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyTextViewNoImage(
|
||||
context,
|
||||
getString(R.string.fairy_no_further_data_is_available)
|
||||
)
|
||||
)
|
||||
.setLayoutManager(GridLayoutManager(context, 2, LinearLayoutManager.VERTICAL, false))
|
||||
.build()
|
||||
viewModel.debrisExchangeListLiveData.observe(viewLifecycleOwner) {
|
||||
rvDelegate.setNewData(it)
|
||||
}
|
||||
debrisAdapter.setOnItemChildClickListener { _, _, position ->
|
||||
debrisAdapter.getItem(position)?.let {
|
||||
dialogManager.showTipsDialog("您將要兌換“${it.getPrizeName()}”", "兌換") {
|
||||
viewModel.debrisExchange(it.itemId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.getDebrisExchangeList()
|
||||
viewModel.getMyFairyInfo()
|
||||
|
||||
binding.llMyDebris.visibility = View.VISIBLE
|
||||
binding.rvMyFairy.visibility = View.GONE
|
||||
viewModel.myFairyInfoLiveData.observe(viewLifecycleOwner) {
|
||||
it?.let {
|
||||
binding.tvDebrisNum.text = it.chipNum.toString()
|
||||
}
|
||||
}
|
||||
|
||||
UserModel.get().cacheLoginUserInfo?.let {
|
||||
binding.ivAvatar.loadAvatar(it.avatar)
|
||||
binding.tvNickname.text = it.nick.subAndReplaceDot(7)
|
||||
}
|
||||
|
||||
viewModel.debrisExchangeLiveData.observe(viewLifecycleOwner) {
|
||||
it?.getContentIfNotHandled()?.let {
|
||||
"兌換成功~".toast()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -1,62 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.TreasureFairyFragmentExchangeRecordDebrisBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.ExchangeDebrisRecordAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
|
||||
class ExchangeDebrisRecordFragment : BaseViewBindingFragment<TreasureFairyFragmentExchangeRecordDebrisBinding>() {
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ExchangeDebrisRecordFragment {
|
||||
val args = Bundle()
|
||||
val fragment = ExchangeDebrisRecordFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private var page = 1
|
||||
private val pageSize = 20
|
||||
private lateinit var rvDelegate: RVDelegate<ExchangeGiftInfo>
|
||||
private lateinit var prizeAdapter: ExchangeDebrisRecordAdapter
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
prizeAdapter = ExchangeDebrisRecordAdapter()
|
||||
rvDelegate = RVDelegate.Builder<ExchangeGiftInfo>()
|
||||
.setAdapter(prizeAdapter)
|
||||
.setPageSize(pageSize)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyTextViewNoImage(
|
||||
context,
|
||||
getString(R.string.fairy_no_further_data_is_available)
|
||||
))
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.build()
|
||||
|
||||
viewModel.exchangeDebrisRecordLiveData.observe(viewLifecycleOwner) {
|
||||
rvDelegate.loadData(it)
|
||||
}
|
||||
|
||||
prizeAdapter.setOnLoadMoreListener({ loadData(false) }, binding.recyclerView)
|
||||
|
||||
loadData(true)
|
||||
}
|
||||
|
||||
private fun loadData(isRefresh: Boolean) {
|
||||
page = if (isRefresh) 1 else (page + 1)
|
||||
viewModel.getExchangeDebrisRecord(page, pageSize)
|
||||
}
|
||||
}
|
@@ -1,128 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.core.view.isInvisible
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.databinding.TreasureFairyFragmentExchangeFairyBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.dialog.ExchangeFairyResultDialog
|
||||
import com.chwl.app.treasurefairy.view.MyFairyItemView
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
import com.chwl.core.treasurefairy.MyFairyInfo
|
||||
|
||||
class ExchangeFairyFragment : BaseViewBindingFragment<TreasureFairyFragmentExchangeFairyBinding>() {
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ExchangeFairyFragment {
|
||||
val args = Bundle()
|
||||
val fragment = ExchangeFairyFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
private var fairyType = MyFairyItemView.BASE
|
||||
private val fairyItems by lazy {
|
||||
arrayListOf(
|
||||
binding.fairyItem0,
|
||||
binding.fairyItem1,
|
||||
binding.fairyItem2,
|
||||
binding.fairyItem3,
|
||||
binding.fairyItem4
|
||||
)
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding.ivPrevious.setOnClickListener {
|
||||
fairyType--
|
||||
switchLevel()
|
||||
}
|
||||
binding.ivNext.setOnClickListener {
|
||||
fairyType++
|
||||
switchLevel()
|
||||
}
|
||||
|
||||
binding.ivCompound.isEnabled = false
|
||||
|
||||
viewModel.getMyFairyInfo()
|
||||
|
||||
viewModel.getExchangeGiftInfoList()
|
||||
|
||||
viewModel.myFairyInfoLiveData.observe(viewLifecycleOwner) {
|
||||
it?.let { setupMyFairyInfo(it) }
|
||||
}
|
||||
|
||||
viewModel.exchangeGiftListLiveData.observe(viewLifecycleOwner) {
|
||||
it?.let { setupExchangeGiftList(it) }
|
||||
}
|
||||
|
||||
viewModel.exchangeGiftLiveData.observe(viewLifecycleOwner) {
|
||||
it?.getContentIfNotHandled()?.let {
|
||||
ExchangeFairyResultDialog.newInstance().show(context)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun switchLevel() {
|
||||
viewModel.myFairyInfoLiveData.value?.let {
|
||||
setupMyFairyInfo(it)
|
||||
}
|
||||
viewModel.exchangeGiftListLiveData.value?.let {
|
||||
setupExchangeGiftList(it)
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun setupExchangeGiftList(exchangeGiftList: List<ExchangeGiftInfo>) {
|
||||
val exchangeGift = exchangeGiftList.firstOrNull { it.level == fairyType } ?: return
|
||||
binding.ivGift.load(exchangeGift.rewardPicUrl)
|
||||
binding.tvGiftName.text = exchangeGift.rewardName
|
||||
binding.tvGiftPrice.text = "${exchangeGift.rewardShowValue}鉆"
|
||||
binding.ivCompound.setOnClickListener {
|
||||
viewModel.exchangeGift(exchangeGift.itemId)
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun setupMyFairyInfo(myFairyInfo: MyFairyInfo) {
|
||||
val fairyInfos = when (fairyType) {
|
||||
MyFairyItemView.BASE -> {
|
||||
binding.ivPrevious.isInvisible = true
|
||||
binding.ivTitle.setImageResource(R.drawable.treasure_fairy_ic_exchange_fairy_base)
|
||||
myFairyInfo.lowElves
|
||||
}
|
||||
MyFairyItemView.EPIC -> {
|
||||
binding.ivNext.isInvisible = false
|
||||
binding.ivPrevious.isInvisible = false
|
||||
binding.ivTitle.setImageResource(R.drawable.treasure_fairy_ic_exchange_fairy_epic)
|
||||
myFairyInfo.middleElves
|
||||
}
|
||||
else -> {
|
||||
binding.ivNext.isInvisible = true
|
||||
binding.ivTitle.setImageResource(R.drawable.treasure_fairy_ic_exchange_fairy_legend)
|
||||
myFairyInfo.highElves
|
||||
}
|
||||
}
|
||||
|
||||
var isEnabled = true
|
||||
fairyInfos?.let {
|
||||
fairyItems.forEachIndexed { index, itemView ->
|
||||
itemView.setFairyInfo(it.getOrNull(index))
|
||||
if (it.getOrNull(index)?.elfNum ?: 0 < 1) {
|
||||
isEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
binding.ivCompound.isEnabled = isEnabled
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,65 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.TreasureFairyFragmentExchangeRecordFairyBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.ExchangeFairyRecordAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
|
||||
class ExchangeFairyRecordFragment :
|
||||
BaseViewBindingFragment<TreasureFairyFragmentExchangeRecordFairyBinding>() {
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ExchangeFairyRecordFragment {
|
||||
val args = Bundle()
|
||||
val fragment = ExchangeFairyRecordFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private var page = 1
|
||||
private val pageSize = 20
|
||||
private lateinit var rvDelegate: RVDelegate<ExchangeGiftInfo>
|
||||
private lateinit var prizeAdapter: ExchangeFairyRecordAdapter
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
prizeAdapter = ExchangeFairyRecordAdapter()
|
||||
rvDelegate = RVDelegate.Builder<ExchangeGiftInfo>()
|
||||
.setAdapter(prizeAdapter)
|
||||
.setPageSize(pageSize)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyTextViewNoImage(
|
||||
context,
|
||||
getString(R.string.fairy_no_further_data_is_available)
|
||||
)
|
||||
)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.build()
|
||||
|
||||
viewModel.exchangeFairyRecordLiveData.observe(viewLifecycleOwner) {
|
||||
rvDelegate.loadData(it)
|
||||
}
|
||||
|
||||
prizeAdapter.setOnLoadMoreListener({ loadData(false) }, binding.recyclerView)
|
||||
|
||||
loadData(true)
|
||||
}
|
||||
|
||||
private fun loadData(isRefresh: Boolean) {
|
||||
page = if (isRefresh) 1 else (page + 1)
|
||||
viewModel.getExchangeFairyRecord(page, pageSize)
|
||||
}
|
||||
}
|
@@ -1,102 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.TreasureFairyFragmentExchangeDebrisBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.ExchangeSummonAdapter
|
||||
import com.chwl.app.ui.utils.ImageLoadUtilsV2
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.app.ui.utils.loadAvatar
|
||||
import com.chwl.core.treasurefairy.ExchangeGiftInfo
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
import com.chwl.core.user.UserModel
|
||||
import com.chwl.core.utils.subAndReplaceDot
|
||||
import com.chwl.core.utils.toast
|
||||
|
||||
class ExchangeSummonFragment :
|
||||
BaseViewBindingFragment<TreasureFairyFragmentExchangeDebrisBinding>() {
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ExchangeSummonFragment {
|
||||
val args = Bundle()
|
||||
val fragment = ExchangeSummonFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
private lateinit var rvDelegate: RVDelegate<ExchangeGiftInfo>
|
||||
private lateinit var exchangeSummonAdapter: ExchangeSummonAdapter
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
exchangeSummonAdapter = ExchangeSummonAdapter()
|
||||
rvDelegate = RVDelegate.Builder<ExchangeGiftInfo>()
|
||||
.setAdapter(exchangeSummonAdapter)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyTextViewNoImage(
|
||||
context,
|
||||
getString(R.string.fairy_no_further_data_is_available)
|
||||
)
|
||||
)
|
||||
.setLayoutManager(GridLayoutManager(context, 2, LinearLayoutManager.VERTICAL, false))
|
||||
.build()
|
||||
viewModel.fairyCallInfoLiveData.observe(viewLifecycleOwner) {
|
||||
rvDelegate.setNewData(it)
|
||||
}
|
||||
exchangeSummonAdapter.setOnItemChildClickListener { _, _, position ->
|
||||
exchangeSummonAdapter.getItem(position)?.let {
|
||||
dialogManager.showTipsDialog("您將要兌換“${it.getPrizeName()}”", "兌換") {
|
||||
viewModel.debrisExchange(it.itemId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.getFairyCallList()
|
||||
viewModel.getMyFairyInfo()
|
||||
|
||||
viewModel.myFairyInfoLiveData.observe(viewLifecycleOwner) {
|
||||
it?.let {
|
||||
binding.tvDebrisNum.text = it.chipNum.toString()
|
||||
}
|
||||
}
|
||||
|
||||
UserModel.get().cacheLoginUserInfo?.let {
|
||||
binding.ivAvatar.loadAvatar(it.avatar)
|
||||
binding.tvNickname.text = it.nick.subAndReplaceDot(7)
|
||||
}
|
||||
|
||||
viewModel.debrisExchangeLiveData.observe(viewLifecycleOwner) {
|
||||
it?.getContentIfNotHandled()?.let {
|
||||
"兌換成功~".toast()
|
||||
}
|
||||
}
|
||||
|
||||
val myFairyAdapter =
|
||||
object : BaseQuickAdapter<FairyInfo, BaseViewHolder>(R.layout.item_my_fairy) {
|
||||
override fun convert(helper: BaseViewHolder, item: FairyInfo) {
|
||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_fairy), item.elfPicUrl)
|
||||
helper.setText(R.id.tv_count, item.elfNum.toString())
|
||||
}
|
||||
}
|
||||
binding.rvMyFairy.adapter = myFairyAdapter
|
||||
|
||||
viewModel.myFairyInfoLiveData.observe(this) {
|
||||
it?.let {
|
||||
myFairyAdapter.setNewData(it.highElves?.take(3))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -1,62 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.TreasureFairyFragmentForestPrizesChildBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.ForestPrizesChildAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
|
||||
class ForestPrizesChildFragment :
|
||||
BaseViewBindingFragment<TreasureFairyFragmentForestPrizesChildBinding>() {
|
||||
|
||||
companion object {
|
||||
fun newInstance(type: Int): ForestPrizesChildFragment {
|
||||
val args = Bundle()
|
||||
args.putInt("poolLevel", type)
|
||||
val fragment = ForestPrizesChildFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var rvDelegate: RVDelegate<PrizeInfo>
|
||||
private lateinit var prizeAdapter: ForestPrizesChildAdapter
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
prizeAdapter = ForestPrizesChildAdapter()
|
||||
rvDelegate = RVDelegate.Builder<PrizeInfo>()
|
||||
.setAdapter(prizeAdapter)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyTextViewNoImage(
|
||||
context,
|
||||
getString(R.string.fairy_no_further_data_is_available)
|
||||
))
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setLayoutManager(GridLayoutManager(context, 3, LinearLayoutManager.VERTICAL, false))
|
||||
.build()
|
||||
|
||||
val poolLevel = requireArguments().getInt("poolLevel")
|
||||
viewModel.getForestPrizePool(poolLevel)
|
||||
|
||||
viewModel.forestPoolLiveData.observe(viewLifecycleOwner) {
|
||||
it?.let {
|
||||
if (it.first == poolLevel) {
|
||||
rvDelegate.setNewData(it.second)
|
||||
}
|
||||
} ?: run {
|
||||
rvDelegate.setNewData(null)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.databinding.TreasureFairyFragmentForestPrizesBinding
|
||||
import com.chwl.app.treasurefairy.adapter.ForestIndicatorAdapter
|
||||
import com.chwl.app.ui.user.adapter.UserInfoPagerAdapter
|
||||
import com.chwl.app.ui.widget.magicindicator.MagicIndicator
|
||||
import com.chwl.app.ui.widget.magicindicator.ViewPagerHelper
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator
|
||||
|
||||
class ForestPrizesFragment : BaseViewBindingFragment<TreasureFairyFragmentForestPrizesBinding>() {
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ForestPrizesFragment {
|
||||
val args = Bundle()
|
||||
val fragment = ForestPrizesFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
val viewPager: ViewPager = binding.viewPager
|
||||
val magicIndicator: MagicIndicator = binding.magicIndicator
|
||||
val fragmentList: MutableList<Fragment> = ArrayList()
|
||||
fragmentList.add(ForestPrizesChildFragment.newInstance(1))
|
||||
fragmentList.add(ForestPrizesChildFragment.newInstance(2))
|
||||
fragmentList.add(ForestPrizesChildFragment.newInstance(3))
|
||||
val pagerAdapter = UserInfoPagerAdapter(childFragmentManager, fragmentList)
|
||||
val tagList: MutableList<String> = ArrayList()
|
||||
tagList.add("初級森林")
|
||||
tagList.add("史詩森林")
|
||||
tagList.add("傳說森林")
|
||||
val commonNavigator = CommonNavigator(context)
|
||||
commonNavigator.setTitleWrapContent(true)
|
||||
val magicIndicatorAdapter = ForestIndicatorAdapter(context, tagList)
|
||||
magicIndicatorAdapter.setOnItemSelectListener { position: Int, _: TextView ->
|
||||
viewPager.currentItem = position
|
||||
}
|
||||
commonNavigator.adapter = magicIndicatorAdapter
|
||||
magicIndicator.navigator = commonNavigator
|
||||
commonNavigator.titleContainer.showDividers = LinearLayout.SHOW_DIVIDER_MIDDLE
|
||||
viewPager.offscreenPageLimit = 1
|
||||
viewPager.adapter = pagerAdapter
|
||||
ViewPagerHelper.bind(magicIndicator, viewPager)
|
||||
}
|
||||
|
||||
}
|
@@ -1,64 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.TreasureFairyFragmentForestRecordBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.ForestPrizesRecordAdapter
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
|
||||
class ForestRecordFragment : BaseViewBindingFragment<TreasureFairyFragmentForestRecordBinding>() {
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(): ForestRecordFragment {
|
||||
val args = Bundle()
|
||||
val fragment = ForestRecordFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private var page = 1
|
||||
private val pageSize = 20
|
||||
private lateinit var rvDelegate: RVDelegate<PrizeInfo>
|
||||
private lateinit var prizeAdapter: ForestPrizesRecordAdapter
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
prizeAdapter = ForestPrizesRecordAdapter()
|
||||
rvDelegate = RVDelegate.Builder<PrizeInfo>()
|
||||
.setAdapter(prizeAdapter)
|
||||
.setPageSize(pageSize)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyTextViewNoImage(
|
||||
context,
|
||||
getString(R.string.fairy_no_further_data_is_available)
|
||||
)
|
||||
)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.build()
|
||||
|
||||
viewModel.forestRecordLiveData.observe(viewLifecycleOwner) {
|
||||
rvDelegate.loadData(it)
|
||||
}
|
||||
|
||||
prizeAdapter.setOnLoadMoreListener({ loadData(false) }, binding.recyclerView)
|
||||
|
||||
loadData(true)
|
||||
}
|
||||
|
||||
private fun loadData(isRefresh: Boolean) {
|
||||
page = if (isRefresh) 1 else (page + 1)
|
||||
viewModel.getForestRecord(page, pageSize)
|
||||
}
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.databinding.TreasureFairyFragmentMyFairyBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.dialog.MyFairySearchFriendsDialog
|
||||
import com.chwl.app.treasurefairy.view.MyFairyItemView
|
||||
|
||||
class MyFairyFragment : BaseViewBindingFragment<TreasureFairyFragmentMyFairyBinding>() {
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(fairyType: Int): MyFairyFragment {
|
||||
val args = Bundle()
|
||||
args.putInt("fairyType", fairyType)
|
||||
val fragment = MyFairyFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val fairyType by lazy { requireArguments().getInt("fairyType", MyFairyItemView.BASE) }
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
|
||||
val fairyItems = arrayListOf(
|
||||
binding.fairyItem0,
|
||||
binding.fairyItem1,
|
||||
binding.fairyItem2,
|
||||
)
|
||||
fairyItems.forEach {
|
||||
it.setFairyType(fairyType)
|
||||
it.setOnItemClickListener { view, fairyInfo ->
|
||||
if (fairyInfo == null) return@setOnItemClickListener
|
||||
when (view.id) {
|
||||
R.id.iv_fairy_send -> {
|
||||
MyFairySearchFriendsDialog.newInstance(fairyInfo, true).show(context)
|
||||
}
|
||||
R.id.iv_fairy_get -> {
|
||||
MyFairySearchFriendsDialog.newInstance(fairyInfo, false).show(context)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
viewModel.myFairyInfoLiveData.observe(viewLifecycleOwner) {
|
||||
it?.let {
|
||||
val fairyInfos = when (fairyType) {
|
||||
MyFairyItemView.BASE -> {
|
||||
it.lowElves
|
||||
}
|
||||
MyFairyItemView.EPIC -> {
|
||||
it.middleElves
|
||||
}
|
||||
else -> {
|
||||
it.highElves
|
||||
}
|
||||
}
|
||||
fairyInfos?.let {
|
||||
fairyItems.forEachIndexed { index, itemView ->
|
||||
itemView.setFairyInfo(it.getOrNull(index))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,255 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.base.BaseViewBindingFragment
|
||||
import com.chwl.app.common.EmptyViewHelper
|
||||
import com.chwl.app.databinding.TreasureFairyFragmentTestFairyBinding
|
||||
import com.chwl.app.treasurefairy.FairyViewModel
|
||||
import com.chwl.app.treasurefairy.adapter.ResolveFairyAdapter
|
||||
import com.chwl.app.treasurefairy.adapter.TestFairyAdapter
|
||||
import com.chwl.app.treasurefairy.dialog.ResolveFairyResultDialog
|
||||
import com.chwl.app.treasurefairy.dialog.TestFairyResultDialog
|
||||
import com.chwl.app.treasurefairy.view.MyFairyItemView
|
||||
import com.chwl.app.ui.utils.RVDelegate
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
|
||||
class TestFairyFragment : BaseViewBindingFragment<TreasureFairyFragmentTestFairyBinding>() {
|
||||
|
||||
companion object {
|
||||
fun newInstance(fairyType: Int): TestFairyFragment {
|
||||
val args = Bundle()
|
||||
args.putInt("fairyType", fairyType)
|
||||
val fragment = TestFairyFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private val fairyType by lazy { requireArguments().getInt("fairyType", MyFairyItemView.BASE) }
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
private lateinit var rvDelegate: RVDelegate<FairyInfo>
|
||||
private lateinit var testFairyAdapter: TestFairyAdapter
|
||||
private lateinit var resolveFairyAdapter: ResolveFairyAdapter
|
||||
|
||||
private val showResultRunnable = Runnable {
|
||||
if (canShowResult) {
|
||||
canShowResult = false
|
||||
binding.ivBegin.isEnabled = true
|
||||
if (fairyType == MyFairyItemView.BASE) {
|
||||
viewModel.testResultLiveData
|
||||
} else {
|
||||
viewModel.testLegendResultLiveData
|
||||
}.value?.peekContent()?.let {
|
||||
TestFairyResultDialog.newInstance(it).show(context)
|
||||
}
|
||||
|
||||
} else {
|
||||
resultNotShowed = true
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得精灵碎片
|
||||
*/
|
||||
private val showResolveResultRunnable = Runnable {
|
||||
if (canShowResult) {
|
||||
canShowResult = false
|
||||
binding.ivBegin.isEnabled = true
|
||||
viewModel.resolveResultLiveData.value?.peekContent()?.let {
|
||||
ResolveFairyResultDialog.newInstance(it).show(context)
|
||||
}
|
||||
} else {
|
||||
resultNotShowed = true
|
||||
}
|
||||
}
|
||||
private var canShowResult = false
|
||||
private var resultNotShowed = false
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
val fairyViews = listOf(
|
||||
binding.ivFairy0,
|
||||
binding.ivFairy1,
|
||||
binding.ivFairy2,
|
||||
binding.ivFairy3,
|
||||
binding.ivFairy4
|
||||
)
|
||||
val fairyResolveViews = listOf(binding.ivFairy3)
|
||||
testFairyAdapter = TestFairyAdapter()
|
||||
resolveFairyAdapter = ResolveFairyAdapter()
|
||||
rvDelegate = RVDelegate.Builder<FairyInfo>()
|
||||
.setAdapter(if(fairyType == MyFairyItemView.BASE) resolveFairyAdapter else testFairyAdapter)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyTextViewNoImage(
|
||||
context,
|
||||
getString(R.string.fairy_no_further_data_is_available)
|
||||
)
|
||||
)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setLayoutManager(GridLayoutManager(context, if(fairyType == MyFairyItemView.BASE) 6 else 3 , LinearLayoutManager.VERTICAL, false))
|
||||
.build()
|
||||
|
||||
viewModel.myFairyInfoLiveData.observe(viewLifecycleOwner) {
|
||||
val fairyInfos = it?.lowElves
|
||||
if(fairyType == MyFairyItemView.BASE) {
|
||||
val list = mutableListOf<FairyInfo>()
|
||||
it?.lowElves?.take(3)?.let { it1 -> list.addAll(it1) }
|
||||
it?.highElves?.take(3)?.let { it2 -> list.addAll(it2) }
|
||||
rvDelegate.setNewData(list)
|
||||
} else {
|
||||
rvDelegate.setNewData(fairyInfos?.take(3))
|
||||
}
|
||||
}
|
||||
|
||||
resolveFairyAdapter.setOnItemClickListener { _, _, position ->
|
||||
resolveFairyAdapter.getItem(position)?.let {
|
||||
viewModel.addTestFairy(it, 1)
|
||||
}
|
||||
}
|
||||
|
||||
testFairyAdapter.setOnItemClickListener { _, _, position ->
|
||||
testFairyAdapter.getItem(position)?.let {
|
||||
viewModel.addTestFairy(it, 5)
|
||||
}
|
||||
}
|
||||
|
||||
fairyViews.forEachIndexed { index, imageView ->
|
||||
imageView.setOnClickListener {
|
||||
viewModel.minusTestFairy(index)
|
||||
}
|
||||
}
|
||||
fairyResolveViews.forEachIndexed { index, imageView ->
|
||||
imageView.setOnClickListener {
|
||||
viewModel.minusTestFairy(index)
|
||||
}
|
||||
}
|
||||
binding.tvReset.setOnClickListener {
|
||||
viewModel.cleanTestParam()
|
||||
}
|
||||
binding.tvOneKeyAdd.setOnClickListener {
|
||||
if (fairyType == MyFairyItemView.BASE) {
|
||||
viewModel.oneKeyAdd(resolveFairyAdapter.data, 1)
|
||||
} else {
|
||||
viewModel.oneKeyAdd(testFairyAdapter.data, 5)
|
||||
}
|
||||
}
|
||||
|
||||
if (fairyType == MyFairyItemView.BASE) {
|
||||
binding.viewBgAnim.setBackgroundResource(R.drawable.treasure_fairy_bg_test_fairy_anim_legend)
|
||||
val p = binding.ivFairy3.layoutParams as ConstraintLayout.LayoutParams
|
||||
p.verticalBias = 0.9f
|
||||
binding.tvResolveTips.visibility = View.VISIBLE
|
||||
binding.tvResolveTips.text = getString(R.string.tips_fairy_resolve_low)
|
||||
binding.viewBgTop.setBackgroundResource(R.drawable.treasure_fairy_bg_test_fairy_legend)
|
||||
binding.ivBegin.setBackgroundResource(R.drawable.treasure_fairy_bg_resolve_fairy_begin)
|
||||
binding.tvTips.text = "點擊投入需要分解的精靈"
|
||||
} else {
|
||||
binding.viewBgAnim.setBackgroundResource(R.drawable.treasure_fairy_bg_test_fairy_anim_epic)
|
||||
val p = binding.ivFairy3.layoutParams as ConstraintLayout.LayoutParams
|
||||
p.verticalBias = 0.94f
|
||||
binding.tvResolveTips.visibility = View.GONE
|
||||
binding.viewBgTop.setBackgroundResource(R.drawable.treasure_fairy_bg_test_fairy)
|
||||
binding.ivBegin.setBackgroundResource(R.drawable.treasure_fairy_bg_test_fairy_begin)
|
||||
binding.tvTips.text = "點擊投入試煉傳說精靈"
|
||||
}
|
||||
|
||||
binding.ivBegin.setOnClickListener {
|
||||
if (fairyType == MyFairyItemView.BASE) {
|
||||
if (viewModel.resolveFairy()) {
|
||||
binding.animView.startPlay(
|
||||
requireContext().assets,
|
||||
"vap/test_fairy_anim_epic.mp4"
|
||||
)
|
||||
binding.ivBegin.isEnabled = false
|
||||
canShowResult = false
|
||||
binding.ivBegin.postDelayed(showResolveResultRunnable, 1800)
|
||||
}
|
||||
} else if (viewModel.testFairy(fairyType)) {
|
||||
binding.animView.startPlay(
|
||||
requireContext().assets,
|
||||
if (fairyType == MyFairyItemView.BASE) {
|
||||
"vap/test_fairy_anim_epic.mp4"
|
||||
} else {
|
||||
"vap/test_fairy_anim_legend.mp4"
|
||||
}
|
||||
)
|
||||
binding.ivBegin.isEnabled = false
|
||||
canShowResult = false
|
||||
binding.ivBegin.postDelayed(showResultRunnable, 1800)
|
||||
}
|
||||
}
|
||||
binding.animView.setOnClickListener {
|
||||
if (canShowResult) {
|
||||
binding.ivBegin.removeCallbacks(showResultRunnable)
|
||||
showResultRunnable.run()
|
||||
}
|
||||
}
|
||||
(if (fairyType == MyFairyItemView.BASE) {
|
||||
viewModel.testResultLiveData
|
||||
} else {
|
||||
viewModel.testLegendResultLiveData
|
||||
}).observe(
|
||||
viewLifecycleOwner
|
||||
) {
|
||||
it?.getContentIfNotHandled()?.let {
|
||||
canShowResult = true
|
||||
if (resultNotShowed) {
|
||||
showResultRunnable.run()
|
||||
}
|
||||
} ?: run {
|
||||
binding.ivBegin.isEnabled = true
|
||||
}
|
||||
}
|
||||
|
||||
//分解碎片
|
||||
viewModel.resolveResultLiveData.observe(viewLifecycleOwner) {
|
||||
it?.getContentIfNotHandled()?.let {
|
||||
canShowResult = true
|
||||
if (resultNotShowed) {
|
||||
showResultRunnable.run()
|
||||
}
|
||||
} ?: run {
|
||||
binding.ivBegin.isEnabled = true
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.compoundFairyInfosLiveData.observe(viewLifecycleOwner) {
|
||||
if (fairyType == MyFairyItemView.BASE) {
|
||||
fairyResolveViews.forEachIndexed { index, imageView ->
|
||||
it?.get(index)?.elfPicUrl?.let { elfPicUrl ->
|
||||
binding.tvResolveTips.text = getString(
|
||||
if (it[index].level == FairyInfo.LEVEL_HIGH) {
|
||||
R.string.tips_fairy_resolve_high
|
||||
} else {
|
||||
R.string.tips_fairy_resolve_low
|
||||
}
|
||||
)
|
||||
imageView.load(elfPicUrl)
|
||||
} ?: run {
|
||||
binding.tvResolveTips.text = getString(R.string.tips_fairy_resolve_low)
|
||||
imageView.setImageDrawable(null)
|
||||
}
|
||||
}
|
||||
resolveFairyAdapter.notifyDataSetChanged()
|
||||
} else {
|
||||
fairyViews.forEachIndexed { index, imageView ->
|
||||
it?.get(index)?.elfPicUrl?.let { elfPicUrl ->
|
||||
imageView.load(elfPicUrl)
|
||||
} ?: run {
|
||||
imageView.setImageDrawable(null)
|
||||
}
|
||||
}
|
||||
testFairyAdapter.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,63 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.view
|
||||
|
||||
import android.graphics.*
|
||||
import android.graphics.drawable.Drawable
|
||||
|
||||
class CustomDrawable(private val innerDrawable: Drawable) : Drawable() {
|
||||
private val srcPaint: Paint
|
||||
|
||||
/**
|
||||
* 使用时需要自定义path
|
||||
*/
|
||||
private var srcPath: Path = Path()
|
||||
private val xFermode = PorterDuffXfermode(PorterDuff.Mode.CLEAR)
|
||||
|
||||
/**
|
||||
* 设置内部透明的部分
|
||||
*/
|
||||
fun setSrcPath(srcPath: Path) {
|
||||
this.srcPath = srcPath
|
||||
}
|
||||
|
||||
override fun draw(canvas: Canvas) {
|
||||
innerDrawable.bounds = bounds
|
||||
if (srcPath.isEmpty) {
|
||||
innerDrawable.draw(canvas)
|
||||
} else {
|
||||
// 将绘制操作保存到新的图层
|
||||
val saveCount = canvas.saveLayer(
|
||||
0f, 0f, bounds.width().toFloat(), bounds.height().toFloat(), srcPaint,
|
||||
Canvas.ALL_SAVE_FLAG
|
||||
)
|
||||
// 绘制目标图
|
||||
innerDrawable.draw(canvas)
|
||||
// 设置混合模式
|
||||
srcPaint.xfermode = xFermode
|
||||
// src 绘制源图
|
||||
canvas.drawPath(srcPath, srcPaint)
|
||||
// 清除混合模式
|
||||
srcPaint.xfermode = null
|
||||
// 还原画布
|
||||
canvas.restoreToCount(saveCount)
|
||||
}
|
||||
}
|
||||
|
||||
override fun setAlpha(alpha: Int) {
|
||||
innerDrawable.alpha = alpha
|
||||
}
|
||||
|
||||
override fun setColorFilter(colorFilter: ColorFilter?) {
|
||||
innerDrawable.colorFilter = colorFilter
|
||||
}
|
||||
|
||||
override fun getOpacity(): Int {
|
||||
return innerDrawable.opacity
|
||||
}
|
||||
|
||||
init {
|
||||
// path默认实现
|
||||
srcPath.addRect(100f, 100f, 200f, 200f, Path.Direction.CW)
|
||||
srcPaint = Paint(Paint.ANTI_ALIAS_FLAG)
|
||||
srcPaint.color = -0x1
|
||||
}
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.view
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.annotation.Nullable
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.databinding.TreasureFairyItemExchangeBinding
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
|
||||
class ExchangeItemView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
@Nullable attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
private val binding: TreasureFairyItemExchangeBinding
|
||||
|
||||
init {
|
||||
inflate(context, R.layout.treasure_fairy_item_exchange, this)
|
||||
binding = TreasureFairyItemExchangeBinding.bind(this)
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
fun setFairyInfo(fairyInfo: FairyInfo?) {
|
||||
fairyInfo?.let {
|
||||
binding.ivFairyIcon.load(it.elfPicUrl)
|
||||
binding.tvFairyName.text = it.elfName
|
||||
binding.tvFairyNum.text = "${it.elfNum}"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.widget.FrameLayout
|
||||
import androidx.annotation.Nullable
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.databinding.TreasureFairyItemHomeBinding
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.PrizeInfo
|
||||
|
||||
class HomeItemView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
@Nullable attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
private val binding: TreasureFairyItemHomeBinding
|
||||
|
||||
init {
|
||||
inflate(context, R.layout.treasure_fairy_item_home, this)
|
||||
binding = TreasureFairyItemHomeBinding.bind(this)
|
||||
}
|
||||
|
||||
fun setPrizeInfo(prizeInfo: PrizeInfo) {
|
||||
binding.ivPrizeIcon.load(prizeInfo.rewardPicUrl)
|
||||
binding.tvPrizeName.text = prizeInfo.rewardName
|
||||
}
|
||||
|
||||
}
|
@@ -1,118 +0,0 @@
|
||||
package com.chwl.app.treasurefairy.view
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import androidx.annotation.Nullable
|
||||
import androidx.core.graphics.toColorInt
|
||||
import androidx.core.view.isVisible
|
||||
import com.chwl.app.R
|
||||
import com.chwl.app.databinding.TreasureFairyItemMyFairyBaseBinding
|
||||
import com.chwl.app.ui.utils.load
|
||||
import com.chwl.core.treasurefairy.FairyInfo
|
||||
|
||||
class MyFairyItemView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
@Nullable attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
companion object {
|
||||
const val BASE = 1
|
||||
const val EPIC = 2
|
||||
const val LEGEND = 3
|
||||
}
|
||||
|
||||
private val binding: TreasureFairyItemMyFairyBaseBinding
|
||||
private var fairyInfo: FairyInfo? = null
|
||||
|
||||
init {
|
||||
inflate(context, R.layout.treasure_fairy_item_my_fairy_base, this)
|
||||
binding = TreasureFairyItemMyFairyBaseBinding.bind(this)
|
||||
binding.clSurface.setOnClickListener {
|
||||
binding.root.animate()
|
||||
.rotationY(180f)
|
||||
.setDuration(500)
|
||||
.start()
|
||||
binding.root.postDelayed({
|
||||
binding.clSurface.isVisible = false
|
||||
binding.clBack.isVisible = true
|
||||
}, 250)
|
||||
}
|
||||
binding.clBack.setOnClickListener {
|
||||
binding.root.animate()
|
||||
.rotationY(0f)
|
||||
.setDuration(500)
|
||||
.start()
|
||||
binding.root.postDelayed({
|
||||
binding.clSurface.isVisible = true
|
||||
binding.clBack.isVisible = false
|
||||
}, 250)
|
||||
}
|
||||
|
||||
binding.ivFairySend.setOnClickListener {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
fun setFairyInfo(fairyInfo: FairyInfo?) {
|
||||
this.fairyInfo = fairyInfo
|
||||
fairyInfo?.let {
|
||||
binding.tvFairyName.text = it.elfName
|
||||
binding.tvFairyNameBack.text = it.elfName
|
||||
binding.tvFairyNum.text = "x${it.elfNum}"
|
||||
binding.tvFairyNumBack.text = "x${it.elfNum}"
|
||||
binding.ivFairyIcon.load(it.elfPicUrl)
|
||||
binding.ivFairyIconBack.load(it.elfPicUrl)
|
||||
binding.ivFairyEmpty.isVisible = it.elfNum == 0
|
||||
binding.ivFairySend.isVisible = it.elfNum > 0
|
||||
binding.viewCover.isVisible = it.elfNum == 0
|
||||
}
|
||||
}
|
||||
|
||||
fun setOnItemClickListener(onItemClickListener: (view: View, fairyInfo: FairyInfo?) -> Unit) {
|
||||
binding.ivFairyGet.setOnClickListener {
|
||||
onItemClickListener(it, fairyInfo)
|
||||
}
|
||||
binding.ivFairySend.setOnClickListener {
|
||||
onItemClickListener(it, fairyInfo)
|
||||
}
|
||||
}
|
||||
|
||||
fun setFairyType(fairyType: Int) {
|
||||
when (fairyType) {
|
||||
BASE -> {
|
||||
binding.viewBg.setBackgroundResource(R.drawable.treasure_fairy_bg_my_fairy_item_base)
|
||||
binding.viewBgBack.setBackgroundResource(R.drawable.treasure_fairy_bg_my_fairy_item_base)
|
||||
binding.viewCover.setBackgroundResource(R.drawable.treasure_fairy_bg_my_fairy_item_base_cover)
|
||||
binding.tvFairyName.setTextColor("#A4FFFC".toColorInt())
|
||||
binding.tvFairyNameBack.setTextColor("#A4FFFC".toColorInt())
|
||||
binding.tvFairyNum.setTextColor("#FFE8AA".toColorInt())
|
||||
binding.tvFairyNumBack.setTextColor("#FFE8AA".toColorInt())
|
||||
}
|
||||
EPIC -> {
|
||||
binding.viewBg.setBackgroundResource(R.drawable.treasure_fairy_bg_my_fairy_item_epic)
|
||||
binding.viewBgBack.setBackgroundResource(R.drawable.treasure_fairy_bg_my_fairy_item_epic)
|
||||
binding.viewCover.setBackgroundResource(R.drawable.treasure_fairy_bg_my_fairy_item_epic_cover)
|
||||
binding.tvFairyName.setTextColor("#FFFED6".toColorInt())
|
||||
binding.tvFairyNameBack.setTextColor("#FFFED6".toColorInt())
|
||||
binding.tvFairyNum.setTextColor("#59FDFF".toColorInt())
|
||||
binding.tvFairyNumBack.setTextColor("#59FDFF".toColorInt())
|
||||
}
|
||||
LEGEND -> {
|
||||
binding.viewBg.setBackgroundResource(R.drawable.treasure_fairy_bg_my_fairy_item_legend)
|
||||
binding.viewBgBack.setBackgroundResource(R.drawable.treasure_fairy_bg_my_fairy_item_legend)
|
||||
binding.viewCover.setBackgroundResource(R.drawable.treasure_fairy_bg_my_fairy_item_legend_cover)
|
||||
binding.tvFairyName.setTextColor(Color.WHITE)
|
||||
binding.tvFairyNameBack.setTextColor(Color.WHITE)
|
||||
binding.tvFairyNum.setTextColor("#FFE8AA".toColorInt())
|
||||
binding.tvFairyNumBack.setTextColor("#FFE8AA".toColorInt())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -8,7 +8,6 @@ import android.widget.TextView;
|
||||
import com.netease.nim.uikit.business.session.viewholder.MsgViewHolderBase;
|
||||
import com.netease.nim.uikit.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter;
|
||||
import com.chwl.app.R;
|
||||
import com.chwl.app.treasurefairy.dialog.MyFairySendDialog;
|
||||
import com.chwl.app.ui.utils.ImageLoadUtils;
|
||||
import com.chwl.core.auth.AuthModel;
|
||||
import com.chwl.core.gift.bean.SimpleUserInfo;
|
||||
@@ -78,22 +77,22 @@ public class MsgViewHolderFairy extends MsgViewHolderBase implements View.OnClic
|
||||
@SuppressLint("CheckResult")
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
FairySendAttachment attachment = (FairySendAttachment) message.getAttachment();
|
||||
SimpleUserInfo userInfo = new SimpleUserInfo(attachment.getNick(), attachment.getUid(), 0, "", "");
|
||||
FairyInfo fairyInfo = new FairyInfo(attachment.getElfId(), 1, 1, attachment.getElfName(), attachment.getElfPicUrl(), 0);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("userInfo", userInfo);
|
||||
bundle.putSerializable("fairyInfo", fairyInfo);
|
||||
bundle.putBoolean("isSend", true);
|
||||
MyFairySendDialog sendDialog = MyFairySendDialog.Companion.newInstance(bundle, userInfo);
|
||||
sendDialog.setOnSendListener(() -> {
|
||||
Map<String, Object> localExtension = message.getLocalExtension();
|
||||
if (localExtension == null) localExtension = new HashMap<>();
|
||||
localExtension.put(IS_SEND, true);
|
||||
message.setLocalExtension(localExtension);
|
||||
IMNetEaseManager.get().updateMessageToLocal(message);
|
||||
return null;
|
||||
});
|
||||
sendDialog.show(context);
|
||||
// FairySendAttachment attachment = (FairySendAttachment) message.getAttachment();
|
||||
// SimpleUserInfo userInfo = new SimpleUserInfo(attachment.getNick(), attachment.getUid(), 0, "", "");
|
||||
// FairyInfo fairyInfo = new FairyInfo(attachment.getElfId(), 1, 1, attachment.getElfName(), attachment.getElfPicUrl(), 0);
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putSerializable("userInfo", userInfo);
|
||||
// bundle.putSerializable("fairyInfo", fairyInfo);
|
||||
// bundle.putBoolean("isSend", true);
|
||||
// MyFairySendDialog sendDialog = MyFairySendDialog.Companion.newInstance(bundle, userInfo);
|
||||
// sendDialog.setOnSendListener(() -> {
|
||||
// Map<String, Object> localExtension = message.getLocalExtension();
|
||||
// if (localExtension == null) localExtension = new HashMap<>();
|
||||
// localExtension.put(IS_SEND, true);
|
||||
// message.setLocalExtension(localExtension);
|
||||
// IMNetEaseManager.get().updateMessageToLocal(message);
|
||||
// return null;
|
||||
// });
|
||||
// sendDialog.show(context);
|
||||
}
|
||||
}
|
||||
|
@@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="262dp"
|
||||
android:layout_height="316dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_new"
|
||||
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:layout_width="136dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:background="@drawable/treasure_fairy_buy_debris"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintBottom_toTopOf="@+id/iv_prize_icon"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="60dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_debris_default"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:drawableStart="@drawable/treasure_fairy_ic_diamond"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_prize_icon"
|
||||
tools:text="10000" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_debris_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:text="@string/buy_debris"
|
||||
android:textColor="@color/color_ffe8aa"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_prize_name" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:text="購買"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textColor="@color/color_1f5764"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="34dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
app:corner="@dimen/dp_18"
|
||||
app:shaderEnable="true"
|
||||
app:shaderMode="topToBottom"
|
||||
app:shaderStartColor="@color/color_FFFEBB"
|
||||
app:shaderEndColor="@color/color_3AEAC7"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_debris_num" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/cbPay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:button="@drawable/selector_select_fairy"
|
||||
android:paddingStart="@dimen/dp_6"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="今日不再提示"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_buy" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,129 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="@dimen/dp_258"
|
||||
android:layout_height="@dimen/dp_315"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_new"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_header" />
|
||||
|
||||
<View
|
||||
android:id="@+id/iv_header"
|
||||
android:layout_width="@dimen/dp_136"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:background="@drawable/treasure_fairy_buy_debris"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:text="@string/fairy_debris_not_enough_please_buy"
|
||||
android:textColor="@color/color_ffe8aa"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_header" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_debris_default"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_tips" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:drawableStart="@drawable/treasure_fairy_ic_diamond"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_prize_icon"
|
||||
tools:text="10000" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_num"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_29"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_marginEnd="@dimen/dp_26"
|
||||
android:background="@color/color_306065"
|
||||
android:gravity="center"
|
||||
android:inputType="number"
|
||||
android:text="@string/zero"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_increase"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_decrease"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_prize_name" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_decrease"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_29"
|
||||
android:layout_marginStart="@dimen/dp_42"
|
||||
android:src="@drawable/ic_dialog_fairy_buy_debris_decrease"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_num"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/et_num" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_increase"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_29"
|
||||
android:layout_marginEnd="@dimen/dp_42"
|
||||
android:src="@drawable/ic_dialog_fairy_buy_debris_increase"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_num"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/et_num" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:gravity="center"
|
||||
android:text="@string/layout_item_decoration_common_04"
|
||||
android:textColor="@color/color_1f5764"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:corner="@dimen/dp_18"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_num"
|
||||
app:shaderEnable="true"
|
||||
app:shaderEndColor="@color/color_3AEAC7"
|
||||
app:shaderMode="topToBottom"
|
||||
app:shaderStartColor="@color/color_FFFEBB" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,88 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="@dimen/dp_260"
|
||||
android:layout_height="@dimen/dp_244"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_new"
|
||||
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:layout_width="136dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:background="@drawable/treasure_fairy_buy_success"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_title"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_46"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/avroom_widget_roomeffectview_015"
|
||||
android:textColor="@color/color_ffe8aa"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
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_prize_icon"
|
||||
android:layout_width="@dimen/dp_65"
|
||||
android:layout_height="@dimen/dp_65"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_debris_default"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_debris_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="14dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_ffe8aa"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_prize_icon"
|
||||
tools:text="x1000" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/cbPay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:button="@drawable/selector_select_fairy"
|
||||
android:paddingStart="@dimen/dp_6"
|
||||
android:paddingEnd="0dp"
|
||||
android:text="今日不再提示"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_debris_num" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_elf"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="750:1100"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="42dp"
|
||||
android:src="@drawable/treasure_fairy_ic_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="54dp"
|
||||
android:src="@drawable/treasure_fairy_bg_exchange_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_rg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:background="@drawable/treasure_fairy_bg_my_fairy_rg"
|
||||
app:layout_constraintDimensionRatio="690:82"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title"
|
||||
app:layout_constraintWidth_percent="0.92" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_rg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_rg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_rg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_rg">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_epic"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_bg_fairy_exchange_fairy"
|
||||
android:button="@null"
|
||||
android:checked="true" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_legend"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_bg_fairy_exchange_debris"
|
||||
android:button="@null" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_record"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/treasure_fairy_bg_test_fairy_record"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="0dp"
|
||||
android:lineSpacingMultiplier="0.8"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:text="兌換記錄"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_record"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="631:772"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.75" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_prizes"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="39dp"
|
||||
android:background="@drawable/selector_bg_fairy_exchange_record_fairy"
|
||||
android:button="@null"
|
||||
android:checked="true" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_record"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="39dp"
|
||||
android:layout_marginStart="36dp"
|
||||
android:background="@drawable/selector_bg_fairy_exchange_record_debris"
|
||||
android:button="@null" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/rg" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,303 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_home"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="750:1245"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_title"
|
||||
app:layout_constraintDimensionRatio="306:157"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:layout_constraintWidth_percent="0.408" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="42dp"
|
||||
android:src="@drawable/treasure_fairy_ic_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_my_fairy"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/treasure_fairy_ic_my_fairy"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_record"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_fairy_test" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_test"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/treasure_fairy_bg_forest_test"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_record"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_fairy_store" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_store"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_store"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_record"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_record" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_record"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_record"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_forest_base"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_base"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_forest"
|
||||
app:layout_constraintDimensionRatio="678:522"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.89" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_forest"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest"
|
||||
app:layout_constraintDimensionRatio="740:546"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_record"
|
||||
app:layout_constraintWidth_percent="0.97" />
|
||||
|
||||
<com.tencent.qgame.animplayer.AnimView
|
||||
android:id="@+id/anim_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_forest_base"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_forest_base"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_forest_base"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_forest_base" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_previous"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_next"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_forest_base"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_forest_base"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_forest_base"
|
||||
app:layout_constraintVertical_bias="0.56" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_next"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_next"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_forest_base"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_previous" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="@string/fairy_catch_with_a_beginner_ball"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_forest"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_grab_1"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_grab_1"
|
||||
app:layout_constraintEnd_toStartOf="@id/view_bg_grab_10"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_bg_forest" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/fairy_make_an_arrest"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_grab_1"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_grab_1"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_grab_1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_grab_text_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:text="@string/fairy_primary_faerie_ball"
|
||||
android:textColor="@color/color_1f5764"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_grab_1"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_grab_1"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_grab_1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_grab_10"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_grab_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_grab_1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/view_bg_grab_1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/fairy_ten_arrests"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_grab_10"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_grab_10"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_grab_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_grab_text_10"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:text="@string/fairy_primary_faerie_ball_ten"
|
||||
android:textColor="@color/color_1f5764"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_grab_10"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_grab_10"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_grab_10" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_bottom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="751:183"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.chwl.app.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_bottom" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
tools:text="用戶昵稱~" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_base" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_key_num_base"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="3dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_epic" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_key_num_epic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="3dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_legend" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_key_num_legend"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="3dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="281dp"
|
||||
android:layout_height="285dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_single"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="53dp"
|
||||
android:text="意外發現"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:includeFontPadding="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_close"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_close"
|
||||
android:layout_width="104dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginBottom="42dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_close"
|
||||
android:gravity="center"
|
||||
android:text="關 閉"
|
||||
android:textColor="#ff008573"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_record"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="631:772"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.84" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_prizes"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="39dp"
|
||||
android:background="@drawable/selector_bg_fairy_forest_prize"
|
||||
android:button="@null"
|
||||
android:checked="true" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_record"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="39dp"
|
||||
android:layout_marginStart="36dp"
|
||||
android:background="@drawable/selector_bg_fairy_forest_record"
|
||||
android:button="@null" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/rg" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,533 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_home"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="750:1245"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/treasure_fairy_ic_home_title"
|
||||
app:layout_constraintDimensionRatio="306:156"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:layout_constraintWidth_percent="0.408" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_key_num"
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginStart="30dp"
|
||||
android:background="@drawable/treasure_fairy_bg_key"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="@color/color_F6F6F6"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_more"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_more" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/treasure_fairy_bg_key_number"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_key_num"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_key_num"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_key_num"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_key_num" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_store"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/treasure_fairy_ic_forest_store"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_more"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_my_fairy" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_my_fairy"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/treasure_fairy_ic_my_fairy"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_more"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_more" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_more"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/treasure_fairy_ic_more"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_0"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="14dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintEnd_toStartOf="@id/fairy_item_1"
|
||||
app:layout_constraintHorizontal_chainStyle="spread"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_more"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintEnd_toStartOf="@id/fairy_item_2"
|
||||
app:layout_constraintStart_toEndOf="@id/fairy_item_0"
|
||||
app:layout_constraintTop_toTopOf="@id/fairy_item_0"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintEnd_toStartOf="@id/fairy_item_3"
|
||||
app:layout_constraintStart_toEndOf="@id/fairy_item_1"
|
||||
app:layout_constraintTop_toTopOf="@id/fairy_item_0"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/fairy_item_2"
|
||||
app:layout_constraintTop_toTopOf="@id/fairy_item_0"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="4dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintStart_toStartOf="@id/fairy_item_3"
|
||||
app:layout_constraintTop_toBottomOf="@id/fairy_item_3"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="4dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintStart_toStartOf="@id/fairy_item_4"
|
||||
app:layout_constraintTop_toBottomOf="@id/fairy_item_4"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="4dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintStart_toStartOf="@id/fairy_item_5"
|
||||
app:layout_constraintTop_toBottomOf="@id/fairy_item_5"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_7"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintStart_toStartOf="@id/fairy_item_2"
|
||||
app:layout_constraintTop_toTopOf="@id/fairy_item_6"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_8"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintStart_toStartOf="@id/fairy_item_1"
|
||||
app:layout_constraintTop_toTopOf="@id/fairy_item_7"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_9"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintStart_toStartOf="@id/fairy_item_0"
|
||||
app:layout_constraintTop_toTopOf="@id/fairy_item_8"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_10"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintStart_toStartOf="@id/fairy_item_0"
|
||||
app:layout_constraintTop_toTopOf="@id/fairy_item_5"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.HomeItemView
|
||||
android:id="@+id/fairy_item_11"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintDimensionRatio="75:81"
|
||||
app:layout_constraintStart_toStartOf="@id/fairy_item_0"
|
||||
app:layout_constraintTop_toTopOf="@id/fairy_item_4"
|
||||
app:layout_constraintWidth_percent="0.2" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_lucky_stone_default"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="125dp"
|
||||
android:background="@drawable/treasure_fairy_ic_lucky_stone_default"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_short_lucky_value"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_bg_lucky_value" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_lucky_stone_empty"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="108dp"
|
||||
android:src="@drawable/treasure_fairy_ic_lucky_stone_empty"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_lucky_stone_default"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_lucky_stone_default"
|
||||
app:layout_constraintStart_toStartOf="@id/view_lucky_stone_default"
|
||||
app:layout_constraintTop_toTopOf="@id/view_lucky_stone_default" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_lucky_stone"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="108dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_lucky_stone_default"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_lucky_stone_default"
|
||||
app:layout_constraintStart_toStartOf="@id/view_lucky_stone_default"
|
||||
app:layout_constraintTop_toTopOf="@id/view_lucky_stone_default"
|
||||
tools:src="@drawable/treasure_fairy_ic_lucky_stone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_short_lucky_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textColor="#ff59fdff"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toTopOf="@id/fairy_item_9"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="幸運值達到X后,下次奪寶獲贈精靈球" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_prize_click"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/fairy_item_6"
|
||||
app:layout_constraintEnd_toEndOf="@id/fairy_item_3"
|
||||
app:layout_constraintStart_toStartOf="@id/fairy_item_0"
|
||||
app:layout_constraintTop_toTopOf="@id/fairy_item_0" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_lucky_value"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/treasure_fairy_bg_lucky_value"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/fairy_item_0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_current_lucky_value_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/fairy_current_lucky_value"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_lucky_value"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_current_lucky_value"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_lucky_value" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_current_lucky_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ffffe8aa"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBaseline_toBaselineOf="@id/tv_current_lucky_value_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_current_lucky_value_text"
|
||||
tools:text="2365" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_refresh"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:src="@drawable/ic_fairy_refresh"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_current_lucky_value"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_current_lucky_value"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_current_lucky_value" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_win_result"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:text="@string/Winning_results_are_not_displayed"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/cbWinResult"
|
||||
app:layout_constraintEnd_toStartOf="@+id/cbWinResult"
|
||||
app:layout_constraintTop_toTopOf="@+id/cbWinResult" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/cbWinResult"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@drawable/selector_select_win_result"
|
||||
app:layout_constraintBottom_toTopOf="@+id/iv_open_100"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_open_100" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_open_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:src="@drawable/treasure_fairy_bg_open_1"
|
||||
app:layout_constraintBottom_toTopOf="@+id/cs_bottom"
|
||||
app:layout_constraintDimensionRatio="230:89"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_open_10"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.306" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_open_10"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:src="@drawable/treasure_fairy_bg_open_10"
|
||||
app:layout_constraintBottom_toTopOf="@+id/cs_bottom"
|
||||
app:layout_constraintDimensionRatio="230:89"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_open_100"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_open_1"
|
||||
app:layout_constraintWidth_percent="0.306" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_open_100"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:src="@drawable/treasure_fairy_bg_open_100"
|
||||
app:layout_constraintBottom_toTopOf="@+id/cs_bottom"
|
||||
app:layout_constraintDimensionRatio="230:89"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_open_10"
|
||||
app:layout_constraintWidth_percent="0.306" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cs_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="67dp"
|
||||
android:background="@drawable/bg_fairy_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_24"
|
||||
android:background="@drawable/bg_17303c_284d5a_15"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_price_1"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:background="@drawable/selector_bg_fairy_price"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view"
|
||||
app:layout_constraintDimensionRatio="44:20"
|
||||
app:layout_constraintStart_toStartOf="@+id/view"
|
||||
app:layout_constraintTop_toTopOf="@+id/view"
|
||||
app:layout_constraintWidth_percent="0.12" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_debris_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:alpha="0.4"
|
||||
android:background="@drawable/ic_debris"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_1"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_price_1"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_one"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:alpha="0.4"
|
||||
android:text="1"
|
||||
android:textColor="@color/color_F6F6F6"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_1"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_debris_1"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_price_2"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:background="@drawable/selector_bg_fairy_price"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view"
|
||||
app:layout_constraintDimensionRatio="44:20"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_price_1"
|
||||
app:layout_constraintTop_toTopOf="@+id/view"
|
||||
app:layout_constraintWidth_percent="0.12" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_debris_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:alpha="0.4"
|
||||
android:background="@drawable/ic_debris"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_2"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_price_2"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_2" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_two"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:alpha="0.4"
|
||||
android:text="10"
|
||||
android:textColor="@color/color_F6F6F6"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_2"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_debris_2"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_2" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_price_3"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:background="@drawable/selector_bg_fairy_price"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view"
|
||||
app:layout_constraintDimensionRatio="44:20"
|
||||
app:layout_constraintStart_toEndOf="@+id/view_price_2"
|
||||
app:layout_constraintTop_toTopOf="@+id/view"
|
||||
app:layout_constraintWidth_percent="0.12" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_debris_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:alpha="0.4"
|
||||
android:background="@drawable/ic_debris"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_3"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_price_3"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_3" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_three"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:alpha="0.4"
|
||||
android:text="100"
|
||||
android:textColor="@color/color_F6F6F6"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_3"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_debris_3"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_3" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_quantity"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:hint="@string/please_input_quantity"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/color_66F6F6F6"
|
||||
android:textSize="@dimen/sp_9"
|
||||
app:corner="@dimen/dp_4"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view"
|
||||
app:layout_constraintDimensionRatio="60:20"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_buy"
|
||||
app:layout_constraintTop_toTopOf="@+id/view"
|
||||
app:layout_constraintWidth_percent="0.16" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:background="@drawable/bg_buy"
|
||||
android:gravity="center"
|
||||
android:text="購買"
|
||||
android:textColor="@color/color_1f5764"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view"
|
||||
app:layout_constraintDimensionRatio="60:22"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view"
|
||||
app:layout_constraintTop_toTopOf="@+id/view"
|
||||
app:layout_constraintWidth_percent="0.16" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_prize_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="155dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_open_1"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.chwl.app.avroom.widget.RoomEffectBoxView
|
||||
android:id="@+id/effect_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:visibility="gone" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="90dp"
|
||||
android:background="@drawable/treasure_fairy_bg_home_prize"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="752:729"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="88dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="105dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_home"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="750:1245"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="42dp"
|
||||
android:src="@drawable/treasure_fairy_ic_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/treasure_fairy_ic_my_fairy_title"
|
||||
app:layout_constraintDimensionRatio="306:156"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:layout_constraintWidth_percent="0.408" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_test"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:src="@drawable/treasure_fairy_bg_forest_test"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
android:src="@drawable/treasure_fairy_bg_my_fairy_tip_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_record"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/treasure_fairy_ic_my_fairy_record"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_rg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:background="@drawable/treasure_fairy_bg_my_fairy_rg"
|
||||
app:layout_constraintDimensionRatio="690:82"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_record"
|
||||
app:layout_constraintWidth_percent="0.92" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_rg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_rg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_rg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_rg">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_base"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_bg_fairy_my_base"
|
||||
android:button="@null"
|
||||
android:checked="true" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_legend"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_bg_fairy_my_legend"
|
||||
android:button="@null" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rg" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_my_fairy_record"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="636:766"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.6"
|
||||
app:layout_constraintWidth_percent="0.85" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/fairy_record"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="22dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:layout_marginBottom="42dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_elf"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="750:1100"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="54dp"
|
||||
android:src="@drawable/treasure_fairy_bg_my_fairy_friend_title"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:src="@drawable/treasure_fairy_ic_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_search"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/shape_066a6e_20dp_round"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="搜索好友"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:textColor="#59FDFF"
|
||||
android:textColorHint="#59FDFF"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/edit_search" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_my_fairy_send"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="562:570"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.6"
|
||||
app:layout_constraintWidth_percent="0.75" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
tools:text="確認贈送“用戶昵稱123”1張“小火龍”精靈卡嗎?" />
|
||||
|
||||
<com.chwl.app.common.widget.CircleImageView
|
||||
android:id="@+id/iv_fairy_icon"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_color="#F4FFC3"
|
||||
app:cborder_width="1px"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_close"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="42dp"
|
||||
android:background="@drawable/treasure_fairy_bg_my_fairy_send_cancel"
|
||||
android:gravity="center"
|
||||
android:text="關 閉"
|
||||
android:textColor="#008573"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_send"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:background="@drawable/treasure_fairy_bg_my_fairy_send_buy"
|
||||
android:gravity="center"
|
||||
android:text="購 買"
|
||||
android:textColor="#8A4801"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_close"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_close" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="281dp"
|
||||
android:layout_height="285dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_single"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="53dp"
|
||||
android:text="恭喜獲得碎片"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:includeFontPadding="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_close"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_close"
|
||||
android:layout_width="104dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginBottom="42dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_close"
|
||||
android:gravity="center"
|
||||
android:text="關 閉"
|
||||
android:textColor="#ff008573"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_home"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="750:1245"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="42dp"
|
||||
android:src="@drawable/treasure_fairy_ic_back"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/treasure_fairy_ic_test_fairy_title"
|
||||
app:layout_constraintDimensionRatio="306:156"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:layout_constraintWidth_percent="0.408" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="24dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/rg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_rg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="17dp"
|
||||
android:background="@drawable/treasure_fairy_bg_my_fairy_rg"
|
||||
app:layout_constraintDimensionRatio="690:82"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title"
|
||||
app:layout_constraintWidth_percent="0.92" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_rg"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_rg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_rg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_rg">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_epic"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_bg_fairy_test_epic"
|
||||
android:button="@null"
|
||||
android:checked="true" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_legend"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_bg_fairy_test_legend"
|
||||
android:button="@null" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_record"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:background="@drawable/treasure_fairy_bg_test_fairy_record"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:lineSpacingExtra="0dp"
|
||||
android:lineSpacingMultiplier="0.8"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:text="試煉記錄"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rg" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="318dp"
|
||||
android:layout_height="388dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/treasure_fairy_bg_my_fairy_record"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="53dp"
|
||||
android:text="試煉記錄"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="試煉時間"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="類型"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="投入精靈"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="獲得獎勵"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="42dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="281dp"
|
||||
android:layout_height="285dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_single"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="53dp"
|
||||
android:text="恭喜獲得"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:includeFontPadding="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_close"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_close"
|
||||
android:layout_width="104dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginBottom="42dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_close"
|
||||
android:gravity="center"
|
||||
android:text="關 閉"
|
||||
android:textColor="#ff008573"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,103 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="7dp"
|
||||
android:paddingEnd="7dp"
|
||||
android:paddingBottom="100dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_bottom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="751:183"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.chwl.app.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_bottom" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="用戶昵稱~"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_my_fairy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:orientation="horizontal"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/item_my_fairy" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_my_debris"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="我的碎片:"
|
||||
android:textColor="#ff1f5764"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/treasure_fairy_ic_exchange_debris" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_debris_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="3dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,194 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginBottom="18dp"
|
||||
android:background="@drawable/treasure_fairy_bg_exchange_compound"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="698:972"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintWidth_percent="0.93" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:src="@drawable/treasure_fairy_ic_exchange_fairy_base"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_gift"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/treasure_fairy_bg_exchange_fairy_gift"
|
||||
app:layout_constraintDimensionRatio="500:200"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title"
|
||||
app:layout_constraintWidth_percent="0.67" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_previous"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/treasure_fairy_ic_exchange_next"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_gift"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_gift"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_gift"
|
||||
app:layout_constraintVertical_bias="0.56" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_next"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:src="@drawable/treasure_fairy_ic_exchange_next"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_gift"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_previous" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_gift"
|
||||
app:layout_constraintDimensionRatio="72:92"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_previous"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_gift" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/view_bg_gift_line"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_next"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_gift"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_gift"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="可樂可可可樂" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_gift_line"
|
||||
android:layout_width="83dp"
|
||||
android:layout_height="3dp"
|
||||
android:background="@drawable/treasure_fairy_bg_exchange_gift_space"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_gift_price"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_gift_name"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_gift_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_gift_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gift_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textColor="#ffe8aa"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_gift"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_gift_name"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_gift_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_bg_gift_line"
|
||||
tools:text="34650鉆" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_compound"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/selector_bg_fairy_exchange_compound"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||
app:layout_constraintDimensionRatio="248:238"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:layout_constraintVertical_bias="0.73"
|
||||
app:layout_constraintWidth_percent="0.33" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.ExchangeItemView
|
||||
android:id="@+id/fairy_item_0"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintCircle="@id/iv_compound"
|
||||
app:layout_constraintCircleAngle="0"
|
||||
app:layout_constraintCircleRadius="120dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintWidth_percent="0.21"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.ExchangeItemView
|
||||
android:id="@+id/fairy_item_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintCircle="@id/iv_compound"
|
||||
app:layout_constraintCircleAngle="72"
|
||||
app:layout_constraintCircleRadius="120dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintWidth_percent="0.21"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
|
||||
<com.chwl.app.treasurefairy.view.ExchangeItemView
|
||||
android:id="@+id/fairy_item_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintCircle="@id/iv_compound"
|
||||
app:layout_constraintCircleAngle="144"
|
||||
app:layout_constraintCircleRadius="130dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintWidth_percent="0.21"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
|
||||
<com.chwl.app.treasurefairy.view.ExchangeItemView
|
||||
android:id="@+id/fairy_item_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintCircle="@id/iv_compound"
|
||||
app:layout_constraintCircleAngle="216"
|
||||
app:layout_constraintCircleRadius="130dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintWidth_percent="0.21"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
|
||||
<com.chwl.app.treasurefairy.view.ExchangeItemView
|
||||
android:id="@+id/fairy_item_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintCircle="@id/iv_compound"
|
||||
app:layout_constraintCircleAngle="288"
|
||||
app:layout_constraintCircleRadius="120dp"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintWidth_percent="0.21"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="兌換時間"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="獲得獎勵"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="召喚時間"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="獲得獎勵"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.chwl.app.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="試煉時間"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="類型"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="獲得獎勵"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="20dp" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<com.chwl.app.treasurefairy.view.MyFairyItemView
|
||||
android:id="@+id/fairy_item_0"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- <com.chwl.app.treasurefairy.view.MyFairyItemView-->
|
||||
<!-- android:id="@+id/fairy_item_1"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@id/fairy_item_2"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@id/fairy_item_0"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="@id/fairy_item_0" />-->
|
||||
|
||||
<!-- <com.chwl.app.treasurefairy.view.MyFairyItemView-->
|
||||
<!-- android:id="@+id/fairy_item_2"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@id/fairy_item_1"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="@id/fairy_item_0" />-->
|
||||
|
||||
<com.chwl.app.treasurefairy.view.MyFairyItemView
|
||||
android:id="@+id/fairy_item_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/fairy_item_2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/fairy_item_0" />
|
||||
|
||||
<com.chwl.app.treasurefairy.view.MyFairyItemView
|
||||
android:id="@+id/fairy_item_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/fairy_item_1"
|
||||
app:layout_constraintTop_toTopOf="@id/fairy_item_1" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,181 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_top"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_test_fairy"
|
||||
app:layout_constraintDimensionRatio="750:555"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_anim"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@drawable/treasure_fairy_bg_test_fairy_anim_epic"
|
||||
app:layout_constraintDimensionRatio="684:452"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_top"
|
||||
app:layout_constraintWidth_percent="0.912" />
|
||||
|
||||
<com.tencent.qgame.animplayer.AnimView
|
||||
android:id="@+id/anim_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_anim"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_anim"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_anim" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_0"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_anim"
|
||||
app:layout_constraintHorizontal_bias="0.04"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_anim"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_anim"
|
||||
app:layout_constraintVertical_bias="0.18" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_1"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_anim"
|
||||
app:layout_constraintHorizontal_bias="0.96"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_anim"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_anim"
|
||||
app:layout_constraintVertical_bias="0.18" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_2"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_anim"
|
||||
app:layout_constraintHorizontal_bias="0.10"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_anim"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_anim"
|
||||
app:layout_constraintVertical_bias="0.82" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_3"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_anim"
|
||||
app:layout_constraintHorizontal_bias="0.51"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_anim"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_anim"
|
||||
app:layout_constraintVertical_bias="0.94" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_4"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg_anim"
|
||||
app:layout_constraintHorizontal_bias="0.90"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg_anim"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_anim"
|
||||
app:layout_constraintVertical_bias="0.82" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_resolve_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tips_fairy_resolve_low"
|
||||
android:textColor="@color/color_ffe8aa"
|
||||
android:textSize="8sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_begin"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_fairy_3" />
|
||||
|
||||
<View
|
||||
android:id="@+id/iv_begin"
|
||||
android:layout_width="142dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:background="@drawable/treasure_fairy_bg_test_fairy_begin"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_bg_anim" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:text="點擊投入試煉史詩精靈"
|
||||
android:textColor="@color/color_59fdff"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/view_bg_bottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_bottom" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_reset"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:drawableStart="@drawable/treasure_fairy_ic_test_fairy_refresh"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center"
|
||||
android:text="重新投入"
|
||||
android:textColor="@color/color_ffe8aa"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_tips"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_tips" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_one_key_add"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:background="@drawable/shape_3aeac7_to_fffebb"
|
||||
android:gravity="center"
|
||||
android:text="一鍵投入"
|
||||
android:textColor="#ff1f5764"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_tips"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_reset"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_tips" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg_bottom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="34dp"
|
||||
android:background="@drawable/treasure_fairy_bg_test_fairy_bottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="750:293"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="26dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg_bottom"
|
||||
app:layout_constraintWidth_percent="0.95" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -1,66 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:layout_height="79dp"
|
||||
tools:layout_width="79dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_exchange_item"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_fairy_icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.48"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.36"
|
||||
app:layout_constraintWidth_percent="0.70" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fairy_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="精靈球"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_fairy_num"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="#1f5764"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.83"
|
||||
tools:text="5" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
tools:layout_width="@dimen/dp_169">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_exchange_debris_item"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="338:450"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.325"
|
||||
app:layout_constraintWidth_percent="0.40" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
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.62"
|
||||
tools:text="我的可愛頭飾(1天)" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/zero"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:drawableStartCompat="@drawable/treasure_fairy_ic_exchange_debris"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_prize_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_exchange"
|
||||
android:layout_width="@dimen/dp_70"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:background="@drawable/treasure_exchange_bg"
|
||||
android:gravity="center"
|
||||
android:text="@string/fairy_convert"
|
||||
android:textColor="@color/color_1f5764"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_value" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,65 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
tools:background="@color/black">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time_year"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
tools:text="2023.03.02" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time_hour"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
tools:text="18:25:56" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="#FEF8A8"
|
||||
android:textSize="12sp"
|
||||
tools:text="獲得獎勵" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
tools:text="520鉆" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
tools:background="@color/black">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time_year"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
tools:text="2023.03.02" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time_hour"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
tools:text="18:25:56" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="#FEF8A8"
|
||||
android:textSize="12sp"
|
||||
tools:text="獲得獎勵" />
|
||||
|
||||
|
||||
</LinearLayout>
|
@@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
tools:layout_height="@dimen/dp_239"
|
||||
tools:layout_width="@dimen/dp_169">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_treasure_fairy_exchange_item"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="338:478"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.20"
|
||||
app:layout_constraintWidth_percent="0.40" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
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.52"
|
||||
tools:text="我的可愛頭飾(1天)" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:orientation="horizontal"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_prize_name"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/item_exchange_debris" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_exchange"
|
||||
android:layout_width="@dimen/dp_70"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:background="@drawable/treasure_exchange_bg"
|
||||
android:gravity="center"
|
||||
android:text="@string/fairy_convert"
|
||||
android:textColor="@color/color_1f5764"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/mRecyclerView"
|
||||
app:layout_goneMarginTop="@dimen/dp_8" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_prize"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_006e7c_to_00b9af"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_cover" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/fl_prize"
|
||||
tools:text="精靈球" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:background="@drawable/shape_006e7c_to_00b9af">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_cover" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="@string/fairy_fairy_ball"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_debris_default" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="@string/fairy_fairy_ball"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
tools:layout_width="94dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_pool"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintDimensionRatio="188:230"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_cover"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg"
|
||||
app:layout_constraintWidth_percent="0.7" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_prize_icon"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintVertical_bias="0.58"
|
||||
android:textColor="@color/color_1f5764"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="精靈球" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
tools:background="@color/black">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time_year"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
tools:text="2023.03.02" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time_hour"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
tools:text="18:25:56" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_type"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp"
|
||||
tools:text="類型" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="#FEF8A8"
|
||||
android:textSize="12sp"
|
||||
tools:text="獲得獎勵" />
|
||||
|
||||
|
||||
</LinearLayout>
|
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/treasure_fairy_bg_item_unselect"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="2dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_cover" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="精靈球"
|
||||
android:textColor="#FFE8AA"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selector_bg_fairy_home_item" />
|
||||
|
||||
</FrameLayout>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user