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); gridview 怎么显示网络图片??? 手机Android系统可不可以运行.net编写的程序? 写的android例子程序报错:the application has stopped Eclipse调试的时候Source not found,什么情况 android ndk c++链接库跟进调试 android 2.3.1的pad为什么不能运行2.2的应用程序 android中使用资源文件的一些疑问 请问如何保存控件位置 list中内容怎么替换 使用HTTP协议的POST方式有问题! 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);