Ejemplo n.º 1
0
 internal TN()
 {
     mShow = new _Runnable_302(this);
     mHide = new _Runnable_308(this);
     // XXX This should be changed to use a Dialog, with a Theme.Toast
     // defined that sets up the layout params appropriately.
     android.view.WindowManagerClass.LayoutParams @params = mParams;
     @params.height = android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
     @params.width  = android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
     @params.flags  = android.view.WindowManagerClass.LayoutParams.FLAG_NOT_FOCUSABLE |
                      android.view.WindowManagerClass.LayoutParams.FLAG_NOT_TOUCHABLE | android.view.WindowManagerClass
                      .LayoutParams.FLAG_KEEP_SCREEN_ON;
     @params.format           = android.graphics.PixelFormat.TRANSLUCENT;
     @params.windowAnimations = [email protected]_Toast;
     @params.type             = android.view.WindowManagerClass.LayoutParams.TYPE_TOAST;
     @params.setTitle(java.lang.CharSequenceProxy.Wrap("Toast"));
 }
Ejemplo n.º 2
0
		/// <summary><p>Generate the layout parameters for the popup window.</p></summary>
		/// <param name="token">the window token used to bind the popup's window</param>
		/// <returns>the layout parameters to pass to the window manager</returns>
		private android.view.WindowManagerClass.LayoutParams createPopupLayout(android.os.IBinder
			 token)
		{
			// generates the layout parameters for the drop down
			// we want a fixed size view located at the bottom left of the anchor
			android.view.WindowManagerClass.LayoutParams p = new android.view.WindowManagerClass
				.LayoutParams();
			// these gravity settings put the view at the top left corner of the
			// screen. The view is then positioned to the appropriate location
			// by setting the x and y offsets to match the anchor's bottom
			// left corner
			p.gravity = android.view.Gravity.LEFT | android.view.Gravity.TOP;
			p.width = mLastWidth = mWidth;
			p.height = mLastHeight = mHeight;
			if (mBackground != null)
			{
				p.format = mBackground.getOpacity();
			}
			else
			{
				p.format = android.graphics.PixelFormat.TRANSLUCENT;
			}
			p.flags = computeFlags(p.flags);
			p.type = mWindowLayoutType;
			p.token = token;
			p.softInputMode = mSoftInputMode;
			p.setTitle(java.lang.CharSequenceProxy.Wrap("PopupWindow:" + Sharpen.Util.IntToHexString
				(GetHashCode())));
			return p;
		}