예제 #1
0
            public TrayAnimationTimerTask(GPSAndroid service) : base()
            {
                _service = service;

                /*
                 * if (!_service.mIsTrayOpen)
                 * {
                 *  //mDestX = -_service.mLogoLayout.getWidth();
                 */
                //mDestX = -_service.mRootLayout.Width / TRAY_HIDDEN_FRACTION;

                /*
                 * }
                 * else {
                 *  mDestX = -mRootLayout.getWidth() / TRAY_HIDDEN_FRACTION;
                 * }
                 */

                // Keep upper edge of the widget within the upper limit of screen
                int screenHeight = _service.Resources.DisplayMetrics.HeightPixels;

                mDestY = Math.Max(
                    screenHeight / TRAY_MOVEMENT_REGION_FRACTION,
                    _service.mRootLayoutParams.Y
                    );

                // Keep lower edge of the widget within the lower limit of screen
                mDestY = Math.Min(
                    ((TRAY_MOVEMENT_REGION_FRACTION - 1) * screenHeight) / TRAY_MOVEMENT_REGION_FRACTION - _service.mRootLayout.Width,
                    mDestY
                    );
            }
예제 #2
0
 public DemoServiceBinder(GPSAndroid service)
 {
     this.service = service;
 }