作者:權yzq | 来源:互联网 | 2023-10-10 20:35
Android 10,level 29
华为 VCE AL00
'com.lxj:xpopup:1.9.0'
bug视频地址
https://nim.nosdn.127.net/MTY3NzcwMzU=/bmltYV8xOTE1Nzk2OTg5OF8xNTkyMDQ3MTMxMzAyXzk1MmM2YzU1LTZjNzEtNDQ5ZC05ZjZiLTE3OGRmNGQ5NDJhNQ==
代码:
class PlayLiveMoreDia(context: Context) : AttachPopupView(context) {
override fun getImplLayoutId(): Int {
return R.layout.dia_play_live_dia
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| override fun getPopupAnimator(): PopupAnimator? {
return ScrollScaleAnimator(popupContentView, PopupAnimation.ScrollAlphaFromBottom)
}
override fun getPopupBackground(): Drawable {
return getDrawable(R.drawable.ic_live_more_dilog)!!
}
var definitionLis: (() -> Unit)? = null
var reportLis: (() -> Unit)? = null
override fun onCreate() {
super.onCreate()
tv_definition_start_info.setSingClick {
definitionLis?.invoke()
dismiss()
}
tv_report.setSingClick {
reportLis?.invoke()
dismiss()
}
} |
}
XPopup.Builder(act)
.hasShadowBg(false)
.offsetX(-AutoSizeUtil.dp2px(2f))
.offsetY(-AutoSizeUtil.dp2px(8f))
.popupPosition(PopupPosition.Top)
.atView(iv_live_seting_more)
.asCustom(playLiveMoreDia)
.show()
该提问来源于开源项目:li-xiaojun/XPopup
加群发个视频看看