package com.sixin.module_p.ui.guobang

import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.sixin.module_p.R
import com.sixin.module_p.base.BasePdaActivity
import com.sixin.module_p.databinding.ActivityPdaGuoBangBinding
import com.sixin.module_p.helper.PDAHelper
import me.jessyan.autosize.internal.CustomAdapt

class PdaGuoBangActivity : BasePdaActivity<ActivityPdaGuoBangBinding, PdaGuoBangViewModel>(),
    CustomAdapt {

    override fun layoutId() = R.layout.activity_pda_guo_bang

    override fun viewModelClass(): Class<PdaGuoBangViewModel> {
        return PdaGuoBangViewModel::class.java
    }

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("国际出港板箱过磅")
        viewModel.init(this)
        binding.viewModel = viewModel
    }

    override fun isBaseOnWidth() = true

    override fun getSizeInDp(): Float = PDAHelper.PDA_WIDTH

    companion object {
        @JvmStatic
        fun start(context: Context) {
            val starter = Intent(context, PdaGuoBangActivity::class.java)
            context.startActivity(starter)
        }
    }
}