使用popupwindow弹出的窗体里面的button响应怎么做?? 使用popupwindow弹出的窗体里面的button响应怎么做?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Button是放在PopupWindow里面的View中,那么你的Button直接调用setOnClickListener不就可以了? LayoutInflater layoutInflater = (LayoutInflater)(PVZ_login.this).getSystemService(LAYOUT_INFLATER_SERVICE); // 获取自定义布局文件poplayout.xml的视图 View popview = layoutInflater.inflate(R.layout.XXX, null); PopupWindow popWindow = new PopupWindow(popview,LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);你的意思是 把button放在XXX.xml中??我就是这样做的 但是button无法点击 popupView=LayoutInflater.from(DiaAllActivity.this).inflat(R.layout.dia_cuspopup_dia, null); cusPopupBtn1=(Button)popupView.findViewById(R.id.diaCusPopupSure); button也放在popup 的布局文件中然后和不同的button一样了 求助。安卓大神!! 求救!!!android 怎么发送闪信,请大家多多指教 android 手机怎么查看内存 Android 小问题,高手指点一下,谢谢! android2.2建立数据库content provider和android1.6有区别吗? Google android开发范例大全EX05_09问题 如何手动删除对象,回收内存啊? Layout布局问题 android ListView 优化中的ViewHolder 为什么用static修饰 求大佬告知这个怎么解决! listview 拖动后的动画实现问题 请教大家一个关于android浏览器上网的问题
LayoutInflater layoutInflater = (LayoutInflater)(PVZ_login.this).getSystemService(LAYOUT_INFLATER_SERVICE);
// 获取自定义布局文件poplayout.xml的视图
View popview = layoutInflater.inflate(R.layout.XXX, null);
PopupWindow popWindow = new PopupWindow(popview,LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);你的意思是 把button放在XXX.xml中??我就是这样做的 但是button无法点击
cusPopupBtn1=(Button)popupView.findViewById(R.id.diaCusPopupSure);
button也放在popup 的布局文件中然后和不同的button一样了