夺宝精灵:我的精灵UI
@@ -1288,9 +1288,6 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".ui.im.avtivity.SayHelloListActivity"
|
android:name=".ui.im.avtivity.SayHelloListActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
|
||||||
android:name=".treasurefairy.TreasureFairyActivity"
|
|
||||||
android:theme="@style/treasure_box_activity" />
|
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ import com.mango.moshen.home.helper.OpenRoomHelper
|
|||||||
import com.mango.moshen.module_hall.HallDataManager
|
import com.mango.moshen.module_hall.HallDataManager
|
||||||
import com.mango.moshen.skill.activity.SkillHomeActivity
|
import com.mango.moshen.skill.activity.SkillHomeActivity
|
||||||
import com.mango.moshen.skill.activity.SkillHomeActivity.Companion.start
|
import com.mango.moshen.skill.activity.SkillHomeActivity.Companion.start
|
||||||
import com.mango.moshen.treasurefairy.TreasureFairyActivity
|
import com.mango.moshen.treasurefairy.HomeDialog
|
||||||
import com.mango.moshen.ui.patriarch.PatriarchModeActivity
|
import com.mango.moshen.ui.patriarch.PatriarchModeActivity
|
||||||
import com.mango.moshen.ui.pay.ChargeActivity
|
import com.mango.moshen.ui.pay.ChargeActivity
|
||||||
import com.mango.moshen.ui.relation.AttentionListActivity
|
import com.mango.moshen.ui.relation.AttentionListActivity
|
||||||
@@ -520,7 +520,7 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
|||||||
R.id.me_item_setting -> UIHelper.showSettingAct(mContext)
|
R.id.me_item_setting -> UIHelper.showSettingAct(mContext)
|
||||||
R.id.me_item_vip -> {
|
R.id.me_item_vip -> {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
TreasureFairyActivity.start(mContext)
|
HomeDialog().show(mContext)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
VipMainActivity.start(mContext)
|
VipMainActivity.start(mContext)
|
||||||
|
@@ -1,31 +0,0 @@
|
|||||||
package com.mango.moshen.treasurefairy
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.util.AttributeSet
|
|
||||||
import android.view.View
|
|
||||||
import android.widget.LinearLayout
|
|
||||||
import androidx.annotation.Nullable
|
|
||||||
import com.mango.moshen.R
|
|
||||||
import com.mango.moshen.databinding.ItemTreasureFairyHomeBinding
|
|
||||||
import io.reactivex.Observable
|
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 技能卡
|
|
||||||
*/
|
|
||||||
class FairyItemView @JvmOverloads constructor(
|
|
||||||
context: Context,
|
|
||||||
@Nullable attrs: AttributeSet? = null,
|
|
||||||
defStyleAttr: Int = 0
|
|
||||||
) : LinearLayout(context, attrs, defStyleAttr) {
|
|
||||||
|
|
||||||
private val binding: ItemTreasureFairyHomeBinding
|
|
||||||
|
|
||||||
|
|
||||||
init {
|
|
||||||
inflate(context, R.layout.item_treasure_fairy_home, this)
|
|
||||||
binding = ItemTreasureFairyHomeBinding.bind(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -2,39 +2,27 @@ package com.mango.moshen.treasurefairy
|
|||||||
|
|
||||||
import android.animation.ObjectAnimator
|
import android.animation.ObjectAnimator
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.graphics.Path
|
import android.graphics.Path
|
||||||
import android.os.Bundle
|
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.mango.moshen.R
|
import com.mango.moshen.R
|
||||||
import com.mango.moshen.base.BaseViewBindingActivity
|
import com.mango.moshen.base.BaseDialog
|
||||||
import com.mango.moshen.databinding.ActivityTreasureFairyBinding
|
import com.mango.moshen.databinding.TreasureFairyDialogHomeBinding
|
||||||
import com.mango.treasure_box.bean.PrizeInfo
|
import com.mango.treasure_box.bean.PrizeInfo
|
||||||
import com.netease.nim.uikit.StatusBarUtil
|
|
||||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||||
import io.reactivex.Observable
|
import io.reactivex.Observable
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||||
import org.greenrobot.eventbus.EventBus
|
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
|
||||||
class TreasureFairyActivity : BaseViewBindingActivity<ActivityTreasureFairyBinding>() {
|
class HomeDialog : BaseDialog<TreasureFairyDialogHomeBinding>() {
|
||||||
private var height = 0
|
|
||||||
private var selectIndex = 0
|
private var selectIndex = 0
|
||||||
private val removeRunnable = Runnable { binding.llPrizeHint.removeAllViews() }
|
private val removeRunnable = Runnable { binding.llPrizeHint.removeAllViews() }
|
||||||
private val hintPrizeCacheList = ArrayList<PrizeInfo>()
|
private val hintPrizeCacheList = ArrayList<PrizeInfo>()
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||||
super.onCreate(savedInstanceState)
|
override var gravity = Gravity.BOTTOM
|
||||||
EventBus.getDefault().register(this)
|
|
||||||
//这里的height用MATCH_PARENT状态栏会被顶上去,不知道什么鬼
|
|
||||||
height = ScreenUtil.screenHeight - ScreenUtil.getStatusBarHeight(context)
|
|
||||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, height)
|
|
||||||
window.setGravity(Gravity.BOTTOM)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
val views = listOf<View>(
|
val views = listOf<View>(
|
||||||
@@ -67,6 +55,13 @@ class TreasureFairyActivity : BaseViewBindingActivity<ActivityTreasureFairyBindi
|
|||||||
binding.ivLuckyStone.setImageDrawable(drawable)
|
binding.ivLuckyStone.setImageDrawable(drawable)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.ivOpen1.setOnClickListener {
|
||||||
|
HomePrizeDialog.newInstance().show(context)
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.ivMyFairy.setOnClickListener {
|
||||||
|
MyFairyDialog.newInstance().show(context)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +81,8 @@ class TreasureFairyActivity : BaseViewBindingActivity<ActivityTreasureFairyBindi
|
|||||||
binding.llPrizeHint.removeCallbacks(removeRunnable)
|
binding.llPrizeHint.removeCallbacks(removeRunnable)
|
||||||
binding.llPrizeHint.postDelayed(removeRunnable, 3000)
|
binding.llPrizeHint.postDelayed(removeRunnable, 3000)
|
||||||
val linearLayout =
|
val linearLayout =
|
||||||
LayoutInflater.from(this).inflate(R.layout.item_fairy_prize_hint, null) as LinearLayout
|
LayoutInflater.from(context)
|
||||||
|
.inflate(R.layout.item_fairy_prize_hint, null) as LinearLayout
|
||||||
val layoutParams =
|
val layoutParams =
|
||||||
LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ScreenUtil.dip2px(25f))
|
LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ScreenUtil.dip2px(25f))
|
||||||
layoutParams.setMargins(0, 0, 0, ScreenUtil.dip2px(5f))
|
layoutParams.setMargins(0, 0, 0, ScreenUtil.dip2px(5f))
|
||||||
@@ -113,21 +109,4 @@ class TreasureFairyActivity : BaseViewBindingActivity<ActivityTreasureFairyBindi
|
|||||||
"x" + prizeInfo.prizeNum
|
"x" + prizeInfo.prizeNum
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun needSteepStateBar(): Boolean {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setStatusBar() {
|
|
||||||
super.setStatusBar()
|
|
||||||
StatusBarUtil.transparencyBar(this)
|
|
||||||
StatusBarUtil.StatusBarLightMode(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
fun start(context: Context) {
|
|
||||||
val starter = Intent(context, TreasureFairyActivity::class.java)
|
|
||||||
context.startActivity(starter)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
package com.mango.moshen.treasurefairy
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.widget.LinearLayout
|
||||||
|
import androidx.annotation.Nullable
|
||||||
|
import com.mango.moshen.R
|
||||||
|
import com.mango.moshen.databinding.TreasureFairyItemHomeBinding
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技能卡
|
||||||
|
*/
|
||||||
|
class HomeItemView @JvmOverloads constructor(
|
||||||
|
context: Context,
|
||||||
|
@Nullable attrs: AttributeSet? = null,
|
||||||
|
defStyleAttr: Int = 0
|
||||||
|
) : LinearLayout(context, attrs, defStyleAttr) {
|
||||||
|
|
||||||
|
private val binding: TreasureFairyItemHomeBinding
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
inflate(context, R.layout.treasure_fairy_item_home, this)
|
||||||
|
binding = TreasureFairyItemHomeBinding.bind(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,18 @@
|
|||||||
|
package com.mango.moshen.treasurefairy
|
||||||
|
|
||||||
|
import android.widget.ImageView
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.BaseViewHolder
|
||||||
|
import com.mango.moshen.R
|
||||||
|
import com.mango.moshen.ui.utils.load
|
||||||
|
import com.mango.core.room.game.GameInfo
|
||||||
|
|
||||||
|
class HomePrizeAdapter :
|
||||||
|
BaseQuickAdapter<GameInfo, BaseViewHolder>(R.layout.treasure_fairy_item_home_prize) {
|
||||||
|
|
||||||
|
override fun convert(helper: BaseViewHolder, item: GameInfo) {
|
||||||
|
helper.getView<ImageView>(R.id.iv_cover).load(item.pic,12f)
|
||||||
|
helper.itemView.isSelected = item.isSelect
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,43 @@
|
|||||||
|
package com.mango.moshen.treasurefairy
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.Gravity
|
||||||
|
import android.view.WindowManager
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.mango.core.room.game.GameInfo
|
||||||
|
import com.mango.moshen.base.BaseDialog
|
||||||
|
import com.mango.moshen.databinding.TreasureFairyDialogHomePrizeBinding
|
||||||
|
import com.mango.moshen.ui.utils.RVDelegate
|
||||||
|
|
||||||
|
class HomePrizeDialog : BaseDialog<TreasureFairyDialogHomePrizeBinding>() {
|
||||||
|
|
||||||
|
private lateinit var rvDelegate: RVDelegate<GameInfo>
|
||||||
|
private val prizeAdapter = HomePrizeAdapter()
|
||||||
|
|
||||||
|
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||||
|
override var gravity = Gravity.BOTTOM
|
||||||
|
|
||||||
|
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()
|
||||||
|
}
|
||||||
|
|
||||||
|
rvDelegate = RVDelegate.Builder<GameInfo>()
|
||||||
|
.setAdapter(prizeAdapter)
|
||||||
|
.setRecyclerView(binding.recyclerView)
|
||||||
|
.setLayoutManager(LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false))
|
||||||
|
.build()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,58 @@
|
|||||||
|
package com.mango.moshen.treasurefairy
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.Gravity
|
||||||
|
import android.view.WindowManager
|
||||||
|
import androidx.viewpager.widget.ViewPager
|
||||||
|
import com.mango.core.room.game.GameInfo
|
||||||
|
import com.mango.moshen.R
|
||||||
|
import com.mango.moshen.avroom.adapter.RoomVPAdapter
|
||||||
|
import com.mango.moshen.base.BaseDialog
|
||||||
|
import com.mango.moshen.databinding.TreasureFairyDialogMyFairyBinding
|
||||||
|
import com.mango.moshen.home.adapter.FragmentViewPagerAdapter
|
||||||
|
import com.mango.moshen.ui.utils.RVDelegate
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("CheckResult")
|
||||||
|
override fun init() {
|
||||||
|
binding.rg.setOnCheckedChangeListener { _, checkedId ->
|
||||||
|
when (checkedId) {
|
||||||
|
R.id.rb_base -> binding.viewPager.currentItem = 0
|
||||||
|
R.id.rb_epic -> binding.viewPager.currentItem = 1
|
||||||
|
R.id.rb_legend -> binding.viewPager.currentItem = 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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_epic)
|
||||||
|
2 -> binding.rg.check(R.id.rb_legend)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
binding.viewPager.adapter = RoomVPAdapter(
|
||||||
|
childFragmentManager,
|
||||||
|
listOf(
|
||||||
|
MyFairyFragment.newInstance(),
|
||||||
|
MyFairyFragment.newInstance(),
|
||||||
|
MyFairyFragment.newInstance()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,32 @@
|
|||||||
|
package com.mango.moshen.treasurefairy
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.Gravity
|
||||||
|
import android.view.WindowManager
|
||||||
|
import com.mango.core.room.game.GameInfo
|
||||||
|
import com.mango.moshen.base.BaseDialog
|
||||||
|
import com.mango.moshen.base.BaseFragment
|
||||||
|
import com.mango.moshen.base.BaseViewBindingFragment
|
||||||
|
import com.mango.moshen.databinding.TreasureFairyDialogMyFairyBinding
|
||||||
|
import com.mango.moshen.databinding.TreasureFairyFragmentMyFairyBinding
|
||||||
|
import com.mango.moshen.ui.utils.RVDelegate
|
||||||
|
|
||||||
|
class MyFairyFragment : BaseViewBindingFragment<TreasureFairyFragmentMyFairyBinding>() {
|
||||||
|
|
||||||
|
|
||||||
|
companion object{
|
||||||
|
fun newInstance(): MyFairyFragment{
|
||||||
|
val args = Bundle()
|
||||||
|
val fragment = MyFairyFragment()
|
||||||
|
fragment.arguments = args
|
||||||
|
return fragment
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("CheckResult")
|
||||||
|
override fun init() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,48 @@
|
|||||||
|
package com.mango.moshen.treasurefairy
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.widget.FrameLayout
|
||||||
|
import androidx.annotation.Nullable
|
||||||
|
import androidx.core.view.isVisible
|
||||||
|
import com.mango.moshen.R
|
||||||
|
import com.mango.moshen.databinding.TreasureFairyItemMyFairyBaseBinding
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 技能卡
|
||||||
|
*/
|
||||||
|
class MyFairyItemView @JvmOverloads constructor(
|
||||||
|
context: Context,
|
||||||
|
@Nullable attrs: AttributeSet? = null,
|
||||||
|
defStyleAttr: Int = 0
|
||||||
|
) : FrameLayout(context, attrs, defStyleAttr) {
|
||||||
|
|
||||||
|
private val binding: TreasureFairyItemMyFairyBaseBinding
|
||||||
|
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
BIN
app/src/main/res/drawable-xhdpi/treasure_fairy_bg_home_prize.png
Normal file
After Width: | Height: | Size: 167 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 103 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 21 KiB |
7
app/src/main/res/drawable/selector_bg_fairy_my_base.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:drawable="@drawable/treasure_fairy_ic_my_fairy_base_select" android:state_checked="true" />
|
||||||
|
<item android:drawable="@drawable/treasure_fairy_ic_my_fairy_base_unselect" />
|
||||||
|
|
||||||
|
</selector>
|
7
app/src/main/res/drawable/selector_bg_fairy_my_epic.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:drawable="@drawable/treasure_fairy_ic_my_fairy_epic_select" android:state_checked="true" />
|
||||||
|
<item android:drawable="@drawable/treasure_fairy_ic_my_fairy_epic_unselect" />
|
||||||
|
|
||||||
|
</selector>
|
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:drawable="@drawable/treasure_fairy_ic_my_fairy_legend_select" android:state_checked="true" />
|
||||||
|
<item android:drawable="@drawable/treasure_fairy_ic_my_fairy_legend_unselect" />
|
||||||
|
|
||||||
|
</selector>
|
@@ -70,7 +70,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_title" />
|
app:layout_constraintTop_toBottomOf="@id/iv_title" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_0"
|
android:id="@+id/fairy_item_0"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/iv_more"
|
app:layout_constraintTop_toBottomOf="@id/iv_more"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_1"
|
android:id="@+id/fairy_item_1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/fairy_item_0"
|
app:layout_constraintTop_toTopOf="@id/fairy_item_0"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_2"
|
android:id="@+id/fairy_item_2"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/fairy_item_0"
|
app:layout_constraintTop_toTopOf="@id/fairy_item_0"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_3"
|
android:id="@+id/fairy_item_3"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/fairy_item_0"
|
app:layout_constraintTop_toTopOf="@id/fairy_item_0"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_4"
|
android:id="@+id/fairy_item_4"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/fairy_item_3"
|
app:layout_constraintTop_toBottomOf="@id/fairy_item_3"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_5"
|
android:id="@+id/fairy_item_5"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/fairy_item_4"
|
app:layout_constraintTop_toBottomOf="@id/fairy_item_4"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_6"
|
android:id="@+id/fairy_item_6"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/fairy_item_5"
|
app:layout_constraintTop_toBottomOf="@id/fairy_item_5"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_7"
|
android:id="@+id/fairy_item_7"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/fairy_item_6"
|
app:layout_constraintTop_toTopOf="@id/fairy_item_6"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_8"
|
android:id="@+id/fairy_item_8"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/fairy_item_7"
|
app:layout_constraintTop_toTopOf="@id/fairy_item_7"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_9"
|
android:id="@+id/fairy_item_9"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/fairy_item_8"
|
app:layout_constraintTop_toTopOf="@id/fairy_item_8"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_10"
|
android:id="@+id/fairy_item_10"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="@id/fairy_item_5"
|
app:layout_constraintTop_toTopOf="@id/fairy_item_5"
|
||||||
app:layout_constraintWidth_percent="0.2" />
|
app:layout_constraintWidth_percent="0.2" />
|
||||||
|
|
||||||
<com.mango.moshen.treasurefairy.FairyItemView
|
<com.mango.moshen.treasurefairy.HomeItemView
|
||||||
android:id="@+id/fairy_item_11"
|
android:id="@+id/fairy_item_11"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
31
app/src/main/res/layout/treasure_fairy_dialog_home_prize.xml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?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="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
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>
|
||||||
|
|
114
app/src/main/res/layout/treasure_fairy_dialog_my_fairy.xml
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
<?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:1160"
|
||||||
|
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_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: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="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
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_epic"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/selector_bg_fairy_my_epic"
|
||||||
|
android:button="@null" />
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
19
app/src/main/res/layout/treasure_fairy_fragment_my_fairy.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?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.mango.moshen.treasurefairy.MyFairyItemView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
50
app/src/main/res/layout/treasure_fairy_item_home_prize.xml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<?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="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="70dp"
|
||||||
|
android:layout_height="70dp"
|
||||||
|
android:background="@drawable/treasure_fairy_bg_item_home_prize">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_prize_icon"
|
||||||
|
android:layout_width="52dp"
|
||||||
|
android:layout_height="52dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/default_cover" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_prize_num"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="end|bottom"
|
||||||
|
android:background="@drawable/treasure_fairy_bg_home_prize_number"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingTop="3dp"
|
||||||
|
android:text="X10"
|
||||||
|
android:textColor="#ff1f5764"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
</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="精灵球"
|
||||||
|
android:textColor="#FFE8AA"
|
||||||
|
android:textSize="13sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
179
app/src/main/res/layout/treasure_fairy_item_my_fairy_base.xml
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
<?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="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_surface"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_bg"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@drawable/treasure_fairy_bg_my_fairy_item_base"
|
||||||
|
app:layout_constraintDimensionRatio="230:324"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_fairy_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="小火龙"
|
||||||
|
android:textColor="#A4FFFC"
|
||||||
|
android:textSize="15dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_fairy_num"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="13dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="精灵球"
|
||||||
|
android:textColor="#FFE8AA"
|
||||||
|
android:textSize="11dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_fairy_name" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_icon"
|
||||||
|
android:layout_width="76dp"
|
||||||
|
android:layout_height="73dp"
|
||||||
|
android:layout_marginBottom="13dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/default_cover"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_bg_back"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@drawable/treasure_fairy_bg_my_fairy_item_base"
|
||||||
|
app:layout_constraintDimensionRatio="230:324"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_fairy_name_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="小火龙"
|
||||||
|
android:rotationY="180"
|
||||||
|
android:textColor="#A4FFFC"
|
||||||
|
android:textSize="15dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_fairy_num_back"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="13dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="精灵球"
|
||||||
|
android:textColor="#FFE8AA"
|
||||||
|
android:rotationY="180"
|
||||||
|
android:textSize="11dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_fairy_name_back" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_icon_back"
|
||||||
|
android:layout_width="76dp"
|
||||||
|
android:rotationY="180"
|
||||||
|
android:layout_height="73dp"
|
||||||
|
android:layout_marginBottom="13dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/default_cover"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/view_bg_back"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_cover"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@drawable/treasure_fairy_bg_my_fairy_item_base_cover"
|
||||||
|
app:layout_constraintDimensionRatio="230:324"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_send"
|
||||||
|
android:layout_width="54dp"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:rotationY="180"
|
||||||
|
android:src="@drawable/treasure_fairy_ic_my_fairy_send"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/iv_fairy_get"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_chainStyle="packed" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_get"
|
||||||
|
android:layout_width="54dp"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:layout_marginTop="13dp"
|
||||||
|
android:rotationY="180"
|
||||||
|
android:src="@drawable/treasure_fairy_ic_my_fairy_get"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/iv_fairy_send" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_empty"
|
||||||
|
android:layout_width="54dp"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:layout_marginTop="13dp"
|
||||||
|
android:rotationY="180"
|
||||||
|
android:src="@drawable/treasure_fairy_ic_my_fairy_empty"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</FrameLayout>
|
108
app/src/main/res/layout/treasure_fairy_item_my_fairy_epic.xml
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
<?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"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_bg"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@drawable/treasure_fairy_bg_my_fairy_item_epic"
|
||||||
|
app:layout_constraintDimensionRatio="230:324"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_cover"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@drawable/treasure_fairy_bg_my_fairy_item_epic_cover"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintDimensionRatio="230:324"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_send"
|
||||||
|
android:layout_width="54dp"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:src="@drawable/treasure_fairy_ic_my_fairy_send"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/iv_fairy_get"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_chainStyle="packed" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_get"
|
||||||
|
android:layout_width="54dp"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:layout_marginTop="13dp"
|
||||||
|
android:src="@drawable/treasure_fairy_ic_my_fairy_get"
|
||||||
|
android:visibility="gone"
|
||||||
|
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/iv_fairy_send" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_empty"
|
||||||
|
android:layout_width="54dp"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:layout_marginTop="13dp"
|
||||||
|
android:src="@drawable/treasure_fairy_ic_my_fairy_empty"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_fairy_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="小火龙"
|
||||||
|
android:textColor="#FFFED6"
|
||||||
|
android:textSize="15dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_fairy_num"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="13dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="精灵球"
|
||||||
|
android:textColor="#59FDFF"
|
||||||
|
android:textSize="11dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_fairy_name" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_icon"
|
||||||
|
android:layout_width="76dp"
|
||||||
|
android:layout_height="73dp"
|
||||||
|
android:layout_marginBottom="13dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/default_cover"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
108
app/src/main/res/layout/treasure_fairy_item_my_fairy_legend.xml
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
<?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"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_bg"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@drawable/treasure_fairy_bg_my_fairy_item_legend"
|
||||||
|
app:layout_constraintDimensionRatio="230:324"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_cover"
|
||||||
|
android:layout_width="115dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:background="@drawable/treasure_fairy_bg_my_fairy_item_legend_cover"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintDimensionRatio="230:324"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_send"
|
||||||
|
android:layout_width="54dp"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:src="@drawable/treasure_fairy_ic_my_fairy_send"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/iv_fairy_get"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_chainStyle="packed" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_get"
|
||||||
|
android:layout_width="54dp"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:layout_marginTop="13dp"
|
||||||
|
android:src="@drawable/treasure_fairy_ic_my_fairy_get"
|
||||||
|
android:visibility="gone"
|
||||||
|
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/iv_fairy_send" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_empty"
|
||||||
|
android:layout_width="54dp"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:layout_marginTop="13dp"
|
||||||
|
android:src="@drawable/treasure_fairy_ic_my_fairy_empty"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_fairy_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="小火龙"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="15dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_fairy_num"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="13dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="精灵球"
|
||||||
|
android:textColor="#FFE8AA"
|
||||||
|
android:textSize="11dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_fairy_name" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_fairy_icon"
|
||||||
|
android:layout_width="76dp"
|
||||||
|
android:layout_height="73dp"
|
||||||
|
android:layout_marginBottom="13dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/default_cover"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/view_bg"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|