package com.yidianling.course.courseNew

import android.content.Context
import android.view.LayoutInflater
import android.widget.FrameLayout
import android.widget.LinearLayout
import com.ydl.ydl_image.module.GlideApp
import com.yidianling.course.R
import kotlinx.android.synthetic.main.item_view_category.view.*

/**
 * @author : Zhangwenchao
 * @e-mail : zhangwch@yidianling.com
 * @time   : 2018/7/14
 */
class CategoryItemView(context: Context?) : FrameLayout(context) {

    init {
        LayoutInflater.from(context).inflate(R.layout.item_view_category, this, true)
    }

    fun setText(text: CharSequence?) {
        tv_title.text = text
    }

    fun setImage(url: String?) {
        url?.let { GlideApp.with(this).load(it).into(iv_icon) }
    }

}