1. layoutInflater = LayoutInflater.from(mContext);  
  2.     final Dialog dialog = new Dialog(mContext);      
  3.     View popView = layoutInflater.inflate(R.layout.popupwindow, null);  
  4.     //设置Dialog没有标题,这个一定要在设置内容之前定义  
  5.     dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);  
  6.     dialog.setContentView(popView);  
  7.     //设置Dialog没有标题,在之后定义就会报错  
  8.     //dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);  
  9.     dialog.setCancelable(true);  
  10.     viewFilpper = (ViewFlipper) popView.findViewById(R.id.viewFlipper);  
  11.     viewFilpper.setInAnimation(AnimationUtils.loadAnimation(mContext, R.anim.menu_in));  
  12.         viewFilpper.setOutAnimation(AnimationUtils.loadAnimation(mContext, R.anim.menu_out));  
  13.     viewFilpper.setFlipInterval(60000);  
  14.     ImageView imagView = (ImageView) popView.findViewById(R.id.caihead);  
  15.     imagView.setImageBitmap(list.get(m-1));  
  16.      
  17.     Button button =(Button) popView.findViewById(R.id.speed);  
  18.     Button detail =(Button) popView.findViewById(R.id.deleat);  
  19.     dialog.show();