Code example for PopupWindow

Methods: setAnimationStylesetBackgroundDrawableshowAtLocation

0
 
		if ( pw==null || !pw.isShowing())
		{ 
			int ScreenOrientation = act.getWindowManager().getDefaultDisplay().getOrientation();
			if (ScreenOrientation == 1 || ScreenOrientation == 3)
				pw = new PopupWindow(view, LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, true);
			else 
				pw = new PopupWindow(view, LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, true);
			pw.setBackgroundDrawable(new BitmapDrawable()); // ��Ӧ���ؼ�����������
 
			if (UsingAnimation)
				pw.setAnimationStyle(android.R.style.Animation_Dialog);
 
			pw.showAtLocation(WindowParent, Gravity.TOP + Gravity.CENTER_HORIZONTAL, 0, Util.dipTopx(act, 90)); // ��ʾ�ڶ���
 
			new Thread()
			{ 
				public void run() 
				{ 
					while (CountDown > 0)
					{