package cn.muchinfo.rma.view.base.future

import android.graphics.Color
import android.view.Gravity
import cn.muchinfo.rma.R
import cn.muchinfo.rma.view.autoWidget.autoSize
import cn.muchinfo.rma.view.autoWidget.textColorInt
import cn.muchinfo.rma.view.autoWidget.textSizeAuto
import cn.muchinfo.rma.view.base.home.contract.emptyView
import org.jetbrains.anko.*

fun _LinearLayout.detailsView(title: String, content: String, contentColor: Int = R.color.rma_black_33) {
    linearLayout {
        gravity = Gravity.CENTER_VERTICAL
        textView {
            text = title
            textSizeAuto = 31
            textColorInt = R.color.rma_black_33
        }.lparams(wrapContent, wrapContent) {
            marginStart = autoSize(36)
        }

        emptyView()

        textView {
            text = content
            textSizeAuto = 31
            textColorInt = contentColor
        }.lparams(wrapContent, wrapContent) {
            marginEnd = autoSize(36)
        }
    }.lparams(matchParent, autoSize(100))
}