package com.bc_chat.im.activity

import com.bc_chat.im.R
import com.bc_chat.im.databinding.ActivityPicturePreviewBinding
import com.zhaohaoting.framework.abs.BaseNoActionBarActivity
import com.zhaohaoting.framework.abs.contract.BaseContract
import com.zhaohaoting.framework.utils.glid.GlideUtils
import io.rong.message.ImageMessage

/**
 * author：Created by zhaohaoting on 2019/3/19
 * email：526309416@qq.com
 * desc：
 */
class PicturePreviewActivity : BaseNoActionBarActivity<BaseContract.BasePresenter>() {


    private val binding by lazy {
        rootDataBinding as ActivityPicturePreviewBinding
    }

    override fun onInit() {
        setLightMode(resources.getColor(R.color.transparent), false, true)
        val currentMessage = this.intent.getParcelableExtra<ImageMessage>("message") as ImageMessage
        GlideUtils.loadImage(this,  currentMessage.remoteUri.toString(), binding.image)
        binding.imgBack.setOnClickListener {
            closeActivity()
        }
    }

    override fun getLayoutResId(): Int {
        return R.layout.activity_picture_preview
    }

    override fun initPresenter(): BaseContract.BasePresenter? {
        return null
    }
}
