package cn.muchinfo.rma.view.base.home.tradingquery

import android.view.Gravity
import androidx.appcompat.app.AppCompatActivity
import cn.muchinfo.rma.R
import cn.muchinfo.rma.global.data.AmountLogData
import cn.muchinfo.rma.view.autoWidget.autoSize
import cn.muchinfo.rma.view.autoWidget.textColorInt
import cn.muchinfo.rma.view.autoWidget.textSizeAuto
import mtp.polymer.com.autowidget.adapter.BaseViewHolder
import org.jetbrains.anko.*

class MoneyFlowingViewHolder(
    private val activity: AppCompatActivity,
    private val viewModel: TradingQueryViewModel
) : BaseViewHolder<AmountLogData>(activity) {
    override val itemSize: IntArray = intArrayOf(matchParent, wrapContent)

    override fun _FrameLayout.createContentView() {
        linearLayout {
            verticalLayout {
                gravity = Gravity.LEFT
                textView {
                    text = "PT789"
                    textSizeAuto = 29
                    textColorInt = R.color.rma_black_33
                }.lparams(wrapContent, wrapContent)
                textView {
                    text = "买多"
                    textSizeAuto = 22
                    textColorInt = R.color.rma_star_color
                }.lparams(wrapContent, wrapContent)
            }.lparams(autoSize(300), autoSize(100))

            verticalLayout {
                gravity = Gravity.CENTER
                textView {
                    text = "手续费"
                    textSizeAuto = 29
                    textColorInt = R.color.rma_black_33
                }.lparams(wrapContent, wrapContent)

            }.lparams(autoSize(300), autoSize(100))

            verticalLayout {
                gravity = Gravity.RIGHT
                textView {
                    text = "-9000"
                    textSizeAuto = 29
                    textColorInt = R.color.rma_black_33
                }.lparams(wrapContent, wrapContent)
            }.lparams(autoSize(300), autoSize(100))
        }.lparams(matchParent, autoSize(100))
    }

}