popupWindow 弹出另一个PopupWindow出现问题,求大神帮忙,不盛感激 new AlertDialog.Builder(this);这样写 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://blog.csdn.net/sunnyfans/article/details/7969288 这里面有解决方案 您好,我的是两个popupWindow ,不是alertDialog 您好,代码如何, functionsView.findViewById(R.id.voiceLL).setOnTouchListener(new SoundOnTouchDianmingListener(context,data.get(groupPosition),functionsView.findViewById(R.id.voiceLL)));public class SoundOnTouchDianmingListener implements OnTouchListener { private DianmingActivity activity; private PopupWindow recordingSoundWin; private AnimationDrawable rocketAnimation; private MediaRecorder recorder; private File fileStorage ; private LinearLayout clockLL; private TextView clockTextView; private Timer timer; private List<Visitor> listCard=new ArrayList<Visitor>(); private Context context; private View view; public SoundOnTouchDianmingListener(Context context,List<Visitor> listCard,View view){ this.listCard=listCard; this.context=context; this.view=view; activity=(DianmingActivity)context; if(recordingSoundWin==null){ recordingSoundWin=new PopupWindow(LayoutInflater.from(activity.getParent()) .inflate(R.layout.popupwindow_recordsound, null), LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); ImageView rocketImage = (ImageView)recordingSoundWin.getContentView().findViewById(R.id.rocketImage); rocketImage.setBackgroundResource(R.anim.imgchange); rocketAnimation=(AnimationDrawable)rocketImage.getBackground(); } clockLL=(LinearLayout)recordingSoundWin.getContentView().findViewById(R.id.clockLL); clockTextView=(TextView)recordingSoundWin.getContentView().findViewById(R.id.clockTextView); } public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: //显示录音标识 recordingSoundWin.showAtLocation(view, Gravity.CENTER, 0, 0); break;您好,红色部分为报错部分 可以参考这个http://blog.csdn.net/androidzhaoxiaogang/article/details/8472695 tryrecordingSoundWin.showAtLocation(view, Gravity.CENTER, 0, 0);=>recordingSoundWin.showAtLocation(v, Gravity.CENTER, 0, 0); 编译android 4.0.3的时候出现错误。 如何查看SharedPreferences中xml文件的保存路径啊? 求助,socket连接网络调试助手,能发不能收?? Google map怎么获取一个地点的详细信息 Eclipse adt在线安装问题 android eclipse 环境搭建 求助 【转载】浅谈短、信彩信的拦截 怎么在java类里面发送广播,跪求大神指点 Android对话框的圆角设置 请问android读取门禁id卡的算法规则是怎样 android app widget中使用自定义view webview中 动态图片的保存
您好,我的是两个popupWindow ,不是alertDialog
public class SoundOnTouchDianmingListener implements OnTouchListener {
private DianmingActivity activity;
private PopupWindow recordingSoundWin;
private AnimationDrawable rocketAnimation;
private MediaRecorder recorder;
private File fileStorage ;
private LinearLayout clockLL;
private TextView clockTextView;
private Timer timer;
private List<Visitor> listCard=new ArrayList<Visitor>();
private Context context;
private View view;
public SoundOnTouchDianmingListener(Context context,List<Visitor> listCard,View view){
this.listCard=listCard;
this.context=context;
this.view=view;
activity=(DianmingActivity)context;
if(recordingSoundWin==null){
recordingSoundWin=new PopupWindow(LayoutInflater.from(activity.getParent())
.inflate(R.layout.popupwindow_recordsound, null),
LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT);
ImageView rocketImage = (ImageView)recordingSoundWin.getContentView().findViewById(R.id.rocketImage);
rocketImage.setBackgroundResource(R.anim.imgchange);
rocketAnimation=(AnimationDrawable)rocketImage.getBackground();
}
clockLL=(LinearLayout)recordingSoundWin.getContentView().findViewById(R.id.clockLL);
clockTextView=(TextView)recordingSoundWin.getContentView().findViewById(R.id.clockTextView);
} public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
//显示录音标识
recordingSoundWin.showAtLocation(view, Gravity.CENTER, 0, 0);
break;您好,红色部分为报错部分
=>
recordingSoundWin.showAtLocation(v, Gravity.CENTER, 0, 0);