`
antkingwei
  • 浏览: 40817 次
  • 性别: Icon_minigender_1
  • 来自: 日照
社区版块
存档分类
最新评论

Android Dilaog 设置没有标题注意的地方

阅读更多

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();
 一点点教训希望有用
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics