package com.arpa.hndahesudintocctmsdriver.cuspop import android.content.Context import android.view.View import android.widget.TextView import com.arpa.hndahesudintocctmsdriver.R import com.lxj.xpopup.core.PositionPopupView import com.lxj.xpopup.enums.DragOrientation /** * Description: 自定义自由定位Position弹窗 * Create by dance, at 2019/6/14 */ class TopMsgPopup(context: Context,title:String, message: String) : PositionPopupView(context) { private var message: String private var title: String init { this.message = message this.title = title } override fun getImplLayoutId(): Int { return R.layout.popup_qq_msg } override fun getDragOrientation(): DragOrientation { return DragOrientation.DragToLeft } override fun onCreate() { super.onCreate() val tvMessage = findViewById(R.id.tvMessage) as TextView val tvTitle = findViewById(R.id.tvTitle) as TextView tvMessage.text = message tvTitle.text = title } }