精灵夺宝:增加vap特效
This commit is contained in:
BIN
app/src/main/assets/vap/fairy_anim_once.mp4
Normal file
BIN
app/src/main/assets/vap/fairy_anim_once.mp4
Normal file
Binary file not shown.
BIN
app/src/main/assets/vap/fairy_anim_ten.mp4
Normal file
BIN
app/src/main/assets/vap/fairy_anim_ten.mp4
Normal file
Binary file not shown.
BIN
app/src/main/assets/vap/test_fairy_anim_epic.mp4
Normal file
BIN
app/src/main/assets/vap/test_fairy_anim_epic.mp4
Normal file
Binary file not shown.
BIN
app/src/main/assets/vap/test_fairy_anim_legend.mp4
Normal file
BIN
app/src/main/assets/vap/test_fairy_anim_legend.mp4
Normal file
Binary file not shown.
@@ -13,6 +13,7 @@ import com.mango.core.utils.net.ServerException
|
|||||||
import com.mango.core.utils.toast
|
import com.mango.core.utils.toast
|
||||||
import com.mango.moshen.base.BaseViewModel
|
import com.mango.moshen.base.BaseViewModel
|
||||||
import com.mango.moshen.base.Event
|
import com.mango.moshen.base.Event
|
||||||
|
import com.mango.moshen.treasurefairy.view.MyFairyItemView
|
||||||
|
|
||||||
class FairyViewModel : BaseViewModel() {
|
class FairyViewModel : BaseViewModel() {
|
||||||
|
|
||||||
@@ -58,6 +59,9 @@ class FairyViewModel : BaseViewModel() {
|
|||||||
private val _testResultLiveData = MutableLiveData<Event<FairyInfo>>()
|
private val _testResultLiveData = MutableLiveData<Event<FairyInfo>>()
|
||||||
val testResultLiveData: LiveData<Event<FairyInfo>> = _testResultLiveData
|
val testResultLiveData: LiveData<Event<FairyInfo>> = _testResultLiveData
|
||||||
|
|
||||||
|
private val _testLegendResultLiveData = MutableLiveData<Event<FairyInfo>>()
|
||||||
|
val testLegendResultLiveData: LiveData<Event<FairyInfo>> = _testLegendResultLiveData
|
||||||
|
|
||||||
private val _testRecordLiveData = MutableLiveData<ListResult<TestFairyRecordInfo>>()
|
private val _testRecordLiveData = MutableLiveData<ListResult<TestFairyRecordInfo>>()
|
||||||
val testRecordLiveData: LiveData<ListResult<TestFairyRecordInfo>> = _testRecordLiveData
|
val testRecordLiveData: LiveData<ListResult<TestFairyRecordInfo>> = _testRecordLiveData
|
||||||
|
|
||||||
@@ -139,6 +143,10 @@ class FairyViewModel : BaseViewModel() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun cleanDrawForestLiveData() {
|
||||||
|
_drawForestLiveData.value = null
|
||||||
|
}
|
||||||
|
|
||||||
fun getForestInfo() {
|
fun getForestInfo() {
|
||||||
safeLaunch(
|
safeLaunch(
|
||||||
onError = {
|
onError = {
|
||||||
@@ -247,6 +255,8 @@ class FairyViewModel : BaseViewModel() {
|
|||||||
|
|
||||||
fun cleanTestParam() {
|
fun cleanTestParam() {
|
||||||
_compoundFairyInfosLiveData.value = null
|
_compoundFairyInfosLiveData.value = null
|
||||||
|
_testLegendResultLiveData.value = null
|
||||||
|
_testResultLiveData.value = null
|
||||||
val myFairyInfo = _myFairyInfoLiveData.value
|
val myFairyInfo = _myFairyInfoLiveData.value
|
||||||
myFairyInfo?.lowElves?.forEach {
|
myFairyInfo?.lowElves?.forEach {
|
||||||
it.selectedNum = 0
|
it.selectedNum = 0
|
||||||
@@ -333,23 +343,38 @@ class FairyViewModel : BaseViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testFairy(level: Int) {
|
fun testFairy(level: Int): Boolean {
|
||||||
val fairyInfos = _compoundFairyInfosLiveData.value ?: SparseArray()
|
val fairyInfos = _compoundFairyInfosLiveData.value ?: SparseArray()
|
||||||
if (fairyInfos.size() != 3) {
|
if (fairyInfos.size() != 3) {
|
||||||
"精灵数量不足".toast()
|
"精灵数量不足".toast()
|
||||||
return
|
return false
|
||||||
}
|
}
|
||||||
safeLaunch {
|
safeLaunch(
|
||||||
|
onError = {
|
||||||
|
if (level == MyFairyItemView.EPIC) {
|
||||||
|
_testLegendResultLiveData.value = null
|
||||||
|
} else {
|
||||||
|
_testResultLiveData.value = null
|
||||||
|
}
|
||||||
|
|
||||||
|
it.message.toast()
|
||||||
|
},
|
||||||
|
block = {
|
||||||
val fairyTestParam = FairyTestParam()
|
val fairyTestParam = FairyTestParam()
|
||||||
fairyInfos.forEach { _, value ->
|
fairyInfos.forEach { _, value ->
|
||||||
fairyTestParam.expendList.add(Compound(value.elfId, 1))
|
fairyTestParam.expendList.add(Compound(value.elfId, 1))
|
||||||
}
|
}
|
||||||
fairyTestParam.level = level
|
fairyTestParam.level = level
|
||||||
val result = TreasureFairyModel.testFairy(fairyTestParam)
|
val result = TreasureFairyModel.testFairy(fairyTestParam)
|
||||||
_testResultLiveData.value = result?.let { Event(it) }
|
(if (level == MyFairyItemView.EPIC) {
|
||||||
_compoundFairyInfosLiveData.value = null
|
_testLegendResultLiveData
|
||||||
|
} else {
|
||||||
|
_testResultLiveData
|
||||||
|
}).value = result?.let { Event(it) }
|
||||||
getMyFairyInfo()
|
getMyFairyInfo()
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getTestFairyRecordList(
|
fun getTestFairyRecordList(
|
||||||
|
@@ -20,6 +20,18 @@ class ForestFairyDialog : BaseDialog<TreasureFairyDialogForestBinding>() {
|
|||||||
private val viewModel: FairyViewModel by activityViewModels()
|
private val viewModel: FairyViewModel by activityViewModels()
|
||||||
private var currentType = 1
|
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 {
|
companion object {
|
||||||
fun newInstance(): ForestFairyDialog {
|
fun newInstance(): ForestFairyDialog {
|
||||||
val args = Bundle()
|
val args = Bundle()
|
||||||
@@ -62,18 +74,33 @@ class ForestFairyDialog : BaseDialog<TreasureFairyDialogForestBinding>() {
|
|||||||
}
|
}
|
||||||
binding.viewBgGrab1.setOnClickListener {
|
binding.viewBgGrab1.setOnClickListener {
|
||||||
enabledOpenBtn(false)
|
enabledOpenBtn(false)
|
||||||
|
binding.animView.startPlay(requireContext().assets, "vap/fairy_anim_once.mp4")
|
||||||
|
binding.animView.postDelayed(showResultRunnable,1900)
|
||||||
viewModel.drawForestFairy(1, currentType)
|
viewModel.drawForestFairy(1, currentType)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.viewBgGrab10.setOnClickListener {
|
binding.viewBgGrab10.setOnClickListener {
|
||||||
enabledOpenBtn(false)
|
enabledOpenBtn(false)
|
||||||
|
binding.animView.startPlay(requireContext().assets, "vap/fairy_anim_ten.mp4")
|
||||||
|
binding.animView.postDelayed(showResultRunnable,1900)
|
||||||
viewModel.drawForestFairy(10, currentType)
|
viewModel.drawForestFairy(10, currentType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.animView.setOnClickListener {
|
||||||
|
if (canShowResult) {
|
||||||
|
binding.animView.removeCallbacks(showResultRunnable)
|
||||||
|
showResultRunnable.run()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
viewModel.drawForestLiveData.observe(viewLifecycleOwner) {
|
viewModel.drawForestLiveData.observe(viewLifecycleOwner) {
|
||||||
enabledOpenBtn(true)
|
|
||||||
it?.getContentIfNotHandled()?.let {
|
it?.getContentIfNotHandled()?.let {
|
||||||
ForestPrizeDialog.newInstance().show(context)
|
canShowResult = true
|
||||||
|
if (resultNotShowed) {
|
||||||
|
showResultRunnable.run()
|
||||||
|
}
|
||||||
|
}?:run{
|
||||||
|
enabledOpenBtn(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -48,10 +48,14 @@ class ForestPrizeDialog : BaseDialog<TreasureFairyDialogForestPrizeBinding>() {
|
|||||||
val hasSurprise = prizeInfoList.find { it.propType == 1 } != null
|
val hasSurprise = prizeInfoList.find { it.propType == 1 } != null
|
||||||
val isFairy =
|
val isFairy =
|
||||||
requireArguments().getBoolean("isFairy", true) || !hasSurprise
|
requireArguments().getBoolean("isFairy", true) || !hasSurprise
|
||||||
|
if (isFairy) {
|
||||||
|
viewModel.cleanDrawForestLiveData()
|
||||||
|
}
|
||||||
binding.tvTitle.text = if (isFairy) "获得精灵" else "意外发现"
|
binding.tvTitle.text = if (isFairy) "获得精灵" else "意外发现"
|
||||||
if (!isFairy && !isSingle && hasSurprise) {
|
if (!isFairy && !isSingle && hasSurprise) {
|
||||||
newInstance(true).show(context)
|
newInstance(true).show(context)
|
||||||
}
|
}
|
||||||
|
|
||||||
val showPrizeInfoList =
|
val showPrizeInfoList =
|
||||||
prizeInfoList.filter { if (isFairy) (it.propType != 1) else (it.propType == 1) }
|
prizeInfoList.filter { if (isFairy) (it.propType != 1) else (it.propType == 1) }
|
||||||
val isShowDateSingle = showPrizeInfoList.size == 1
|
val isShowDateSingle = showPrizeInfoList.size == 1
|
||||||
|
@@ -49,7 +49,7 @@ class TestFairyResultDialog : BaseDialog<TreasureFairyDialogTestFairyResultBindi
|
|||||||
.build()
|
.build()
|
||||||
|
|
||||||
rvDelegate.setNewData(arrayListOf(prizeInfoList?.peekContent()))
|
rvDelegate.setNewData(arrayListOf(prizeInfoList?.peekContent()))
|
||||||
|
viewModel.cleanTestParam()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@@ -6,6 +6,7 @@ import androidx.fragment.app.activityViewModels
|
|||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import com.mango.core.treasurefairy.FairyInfo
|
import com.mango.core.treasurefairy.FairyInfo
|
||||||
|
import com.mango.moshen.R
|
||||||
import com.mango.moshen.base.BaseViewBindingFragment
|
import com.mango.moshen.base.BaseViewBindingFragment
|
||||||
import com.mango.moshen.databinding.TreasureFairyFragmentTestFairyBinding
|
import com.mango.moshen.databinding.TreasureFairyFragmentTestFairyBinding
|
||||||
import com.mango.moshen.treasurefairy.FairyViewModel
|
import com.mango.moshen.treasurefairy.FairyViewModel
|
||||||
@@ -33,6 +34,18 @@ class TestFairyFragment : BaseViewBindingFragment<TreasureFairyFragmentTestFairy
|
|||||||
private lateinit var rvDelegate: RVDelegate<FairyInfo>
|
private lateinit var rvDelegate: RVDelegate<FairyInfo>
|
||||||
private lateinit var testFairyAdapter: TestFairyAdapter
|
private lateinit var testFairyAdapter: TestFairyAdapter
|
||||||
|
|
||||||
|
private val showResultRunnable = Runnable {
|
||||||
|
if (canShowResult) {
|
||||||
|
canShowResult = false
|
||||||
|
binding.ivBegin.isEnabled = true
|
||||||
|
TestFairyResultDialog.newInstance().show(context)
|
||||||
|
} else {
|
||||||
|
resultNotShowed = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private var canShowResult = false
|
||||||
|
private var resultNotShowed = false
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
@SuppressLint("CheckResult")
|
||||||
override fun init() {
|
override fun init() {
|
||||||
val fairyViews = listOf(binding.ivFairy0, binding.ivFairy1, binding.ivFairy2)
|
val fairyViews = listOf(binding.ivFairy0, binding.ivFairy1, binding.ivFairy2)
|
||||||
@@ -57,7 +70,7 @@ class TestFairyFragment : BaseViewBindingFragment<TreasureFairyFragmentTestFairy
|
|||||||
rvDelegate.setNewData(fairyInfos)
|
rvDelegate.setNewData(fairyInfos)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fairyType == MyFairyItemView.EPIC){
|
if (fairyType == MyFairyItemView.EPIC) {
|
||||||
binding.tvTips.text = "点击投入试炼传说精灵"
|
binding.tvTips.text = "点击投入试炼传说精灵"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,12 +92,45 @@ class TestFairyFragment : BaseViewBindingFragment<TreasureFairyFragmentTestFairy
|
|||||||
viewModel.oneKeyAdd(testFairyAdapter.data)
|
viewModel.oneKeyAdd(testFairyAdapter.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.ivBegin.setOnClickListener {
|
if (fairyType == MyFairyItemView.EPIC) {
|
||||||
viewModel.testFairy(fairyType)
|
binding.viewBgAnim.setBackgroundResource(R.drawable.treasure_fairy_bg_test_fairy_anim_legend)
|
||||||
}
|
}
|
||||||
viewModel.testResultLiveData.observe(viewLifecycleOwner) {
|
|
||||||
|
binding.ivBegin.setOnClickListener {
|
||||||
|
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 {
|
it?.getContentIfNotHandled()?.let {
|
||||||
TestFairyResultDialog.newInstance().show(context)
|
canShowResult = true
|
||||||
|
if (resultNotShowed) {
|
||||||
|
showResultRunnable.run()
|
||||||
|
}
|
||||||
|
} ?: run {
|
||||||
|
binding.ivBegin.isEnabled = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
viewModel.compoundFairyInfosLiveData.observe(viewLifecycleOwner) {
|
viewModel.compoundFairyInfosLiveData.observe(viewLifecycleOwner) {
|
||||||
|
@@ -28,7 +28,7 @@ class ExchangeItemView @JvmOverloads constructor(
|
|||||||
fairyInfo?.let {
|
fairyInfo?.let {
|
||||||
binding.ivFairyIcon.load(it.elfPicUrl)
|
binding.ivFairyIcon.load(it.elfPicUrl)
|
||||||
binding.tvFairyName.text = it.elfName
|
binding.tvFairyName.text = it.elfName
|
||||||
binding.tvFairyNum.text = "x${it.elfNum}"
|
binding.tvFairyNum.text = "${it.elfNum}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
@@ -101,6 +101,15 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_record" />
|
app:layout_constraintTop_toBottomOf="@id/iv_record" />
|
||||||
|
|
||||||
|
<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"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/view_bg_forest"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/view_bg_forest"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/view_bg_forest" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_previous"
|
android:id="@+id/iv_previous"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
|
@@ -36,12 +36,12 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingTop="2dp"
|
android:paddingTop="2dp"
|
||||||
|
android:text="0"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/iv_more"
|
app:layout_constraintBottom_toBottomOf="@id/iv_more"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/iv_more"
|
app:layout_constraintTop_toTopOf="@id/iv_more" />
|
||||||
tools:text="12.2W" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_fairy_treasure"
|
android:id="@+id/iv_fairy_treasure"
|
||||||
|
@@ -20,39 +20,54 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginTop="25dp"
|
android:layout_marginTop="25dp"
|
||||||
android:background="@drawable/treasure_fairy_bg_test_fairy_anim"
|
android:background="@drawable/treasure_fairy_bg_test_fairy_anim_epic"
|
||||||
app:layout_constraintDimensionRatio="684:490"
|
app:layout_constraintDimensionRatio="684:490"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/view_bg_top"
|
app:layout_constraintTop_toTopOf="@id/view_bg_top"
|
||||||
app:layout_constraintWidth_percent="0.91" />
|
app:layout_constraintWidth_percent="0.91" />
|
||||||
|
|
||||||
|
<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
|
<ImageView
|
||||||
android:id="@+id/iv_fairy_0"
|
android:id="@+id/iv_fairy_0"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginStart="30dp"
|
|
||||||
android:layout_marginBottom="46dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
||||||
app:layout_constraintStart_toStartOf="@id/view_bg_anim" />
|
app:layout_constraintEnd_toEndOf="@id/view_bg_anim"
|
||||||
|
app:layout_constraintHorizontal_bias="0.105"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/view_bg_anim"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/view_bg_anim"
|
||||||
|
app:layout_constraintVertical_bias="0.74" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_fairy_1"
|
android:id="@+id/iv_fairy_1"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginBottom="26dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
||||||
app:layout_constraintEnd_toEndOf="@id/view_bg_anim"
|
app:layout_constraintEnd_toEndOf="@id/view_bg_anim"
|
||||||
app:layout_constraintStart_toStartOf="@id/view_bg_anim" />
|
app:layout_constraintStart_toStartOf="@id/view_bg_anim"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/view_bg_anim"
|
||||||
|
app:layout_constraintVertical_bias="0.85" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_fairy_2"
|
android:id="@+id/iv_fairy_2"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_marginEnd="30dp"
|
android:src="@drawable/default_avatar"
|
||||||
android:layout_marginBottom="46dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
app:layout_constraintBottom_toBottomOf="@id/view_bg_anim"
|
||||||
app:layout_constraintEnd_toEndOf="@id/view_bg_anim" />
|
app:layout_constraintEnd_toEndOf="@id/view_bg_anim"
|
||||||
|
app:layout_constraintHorizontal_bias="0.892"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/view_bg_anim"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/view_bg_anim"
|
||||||
|
app:layout_constraintVertical_bias="0.745" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_begin"
|
android:id="@+id/iv_begin"
|
||||||
|
@@ -55,10 +55,12 @@
|
|||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="x5"
|
|
||||||
android:textColor="#1f5764"
|
android:textColor="#1f5764"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintBaseline_toTopOf="@id/tv_fairy_name"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.83"
|
||||||
|
tools:text="5" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@@ -15,6 +15,8 @@ public class PathFilter {
|
|||||||
List<String> list = new ArrayList<>();
|
List<String> list = new ArrayList<>();
|
||||||
list.add("/dynamic/square/publish");
|
list.add("/dynamic/square/publish");
|
||||||
list.add("dynamic/square/publish");
|
list.add("dynamic/square/publish");
|
||||||
|
list.add("act/seize-treasure/elf/compound");
|
||||||
|
list.add("/act/seize-treasure/elf/compound");
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ data class ExchangeGiftInfo(
|
|||||||
|
|
||||||
fun getPrizeUnit(): String {
|
fun getPrizeUnit(): String {
|
||||||
return if (rewardType == "gift") {
|
return if (rewardType == "gift") {
|
||||||
"${rewardShowValue}钻)"
|
"${rewardShowValue}钻"
|
||||||
} else {
|
} else {
|
||||||
"${rewardNum}${rewardUnit}"
|
"${rewardNum}${rewardUnit}"
|
||||||
}
|
}
|
||||||
|
@@ -82,20 +82,19 @@ object TreasureFairyModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun exchangeGift(itemId: Long): ExchangeGiftInfo? = launchRequest {
|
suspend fun exchangeGift(itemId: Long): ExchangeGiftInfo? = launchRequest {
|
||||||
api.exchangeGift(itemId)
|
api.exchangeGift(itemId, AvRoomDataManager.get().roomUid)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun getDebrisExchangeList(): List<ExchangeGiftInfo>? = launchRequest {
|
suspend fun getDebrisExchangeList(): List<ExchangeGiftInfo>? = launchRequest {
|
||||||
api.getDebrisExchangeList()
|
api.getDebrisExchangeList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
suspend fun getExchangeRecord(
|
suspend fun getExchangeRecord(
|
||||||
convertType: Int,
|
convertType: Int,
|
||||||
page: Int,
|
page: Int,
|
||||||
pageSize: Int
|
pageSize: Int
|
||||||
): List<ExchangeGiftInfo>? = launchRequest {
|
): List<ExchangeGiftInfo>? = launchRequest {
|
||||||
api.getExchangeRecord(convertType,page, pageSize)
|
api.getExchangeRecord(convertType, page, pageSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -238,7 +237,10 @@ object TreasureFairyModel {
|
|||||||
*/
|
*/
|
||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST("act/seize-treasure/convert")
|
@POST("act/seize-treasure/convert")
|
||||||
suspend fun exchangeGift(@Field("itemId") itemId: Long): ServiceResult<ExchangeGiftInfo>
|
suspend fun exchangeGift(
|
||||||
|
@Field("itemId") itemId: Long,
|
||||||
|
@Field("roomUid") roomUid: Long
|
||||||
|
): ServiceResult<ExchangeGiftInfo>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user