我是靠谱客的博主 甜美小丸子,这篇文章主要介绍BasePopWindow 弹窗中的参数传递,现在分享给大家,希望可以做个参考。

package com.tencent.qcloud.tim.uikit.component.dialog;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.tencent.qcloud.tim.uikit.R;
import com.tencent.qcloud.tim.uikit.utils.ToastUtil;
import razerdp.basepopup.BasePopupWindow;
public class QrCodeScanPopup extends BasePopupWindow {
View.OnClickListener onClick;
TextView tv;
String text;
public QrCodeScanPopup(Context context,String text) {
super(context);
this.text=text;
//
this.onClick=onClick;
//
tv.setOnClickListener(this.onClick);
//事件要在这里设置 不能再onCreateContentView() 中设置,因为onCreateContentView()执行过早 在那里设置事件绑定的是空的
}
@Override
public View onCreateContentView() {
ViewGroup vg= (ViewGroup) createPopupById(R.layout.dialog_scanqrcode);
tv= vg.findViewById(R.id.identifyQrCode);
/*tv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ToastUtil.toastLongMessage("sssssssssss");
}
});*/
return vg;
}
}

 

最后

以上就是甜美小丸子最近收集整理的关于BasePopWindow 弹窗中的参数传递的全部内容,更多相关BasePopWindow内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(92)

评论列表共有 0 条评论

立即
投稿
返回
顶部