Closed yuandoudou928 closed 2 years ago
touchEvent { view, motionEvent -> //设置点击事件 view.setOnClickListener { toStartActivity(xxx::class.java) } }
setLayout第二个参数可拿到浮窗View:
setLayout
.setLayout(R.layout.float_app) { // it 就是浮窗根布局 it.findViewById<ImageView>(R.id.ivClose).setOnClickListener { EasyFloat.dismiss() } }