package com.gamedog.vididin.widget


import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
import com.gamedog.vididin.R
import com.gamedog.vididin.databinding.DailySignItemBinding
import com.gamedog.vididin.main.fragments.task.DailySignBean
import kotlin.run

class DailySignItemView @JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet? = null,
    defStyleAttr: Int = 0
) : LinearLayout(context, attrs, defStyleAttr) {

    private lateinit var mData: DailySignBean
    private lateinit var mBinding: DailySignItemBinding


    init {
        mBinding = DailySignItemBinding.inflate(LayoutInflater.from(context), this, true)
        mBinding.run {

        }
    }



    fun setData(data: DailySignBean) {
        mData = data
        mBinding.tvGoldNum.text = "" + mData.rewardGold
        mBinding.tvDayNum.text = context.getString(R.string.day) + " "+ mData.dayIndex
    }

    fun setLargeWidthMode() {
        mBinding.ivGold.setImageResource(R.mipmap.icon_gold_x3)
        mBinding.ivBg.setImageResource(R.mipmap.bg_biginner_daily_large)
    }

}



