標籤:android io sp java on log ad as new
layoutInflater = LayoutInflater.from(mContext);
final Dialog dialog = new Dialog(mContext); View popView = layoutInflater.inflate(R.layout.popupwindow, null);//設定Dialog沒有標題,這個一定要在設定內容之前定義dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);dialog.setContentView(popView);//設定Dialog沒有標題,在之後定義就會報錯//dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);dialog.setCancelable(true);viewFilpper = (ViewFlipper) popView.findViewById(R.id.viewFlipper);viewFilpper.setInAnimation(AnimationUtils.loadAnimation(mContext, R.anim.menu_in)); viewFilpper.setOutAnimation(AnimationUtils.loadAnimation(mContext, R.anim.menu_out));viewFilpper.setFlipInterval(60000);ImageView imagView = (ImageView) popView.findViewById(R.id.caihead);imagView.setImageBitmap(list.get(m-1));Button button =(Button) popView.findViewById(R.id.speed);Button detail =(Button) popView.findViewById(R.id.deleat);dialog.show();
Android Dialog定義沒有標題的注意事項