示例#1
0
 public override void resized(int w, int h, android.graphics.Rect coveredInsets, android.graphics.Rect
                              visibleInsets, bool reportDraw, android.content.res.Configuration newConfig)
 {
     android.view.SurfaceView surfaceView = mSurfaceView.get();
     if (surfaceView != null)
     {
         surfaceView.mSurfaceLock.@lock();
         try
         {
             if (reportDraw)
             {
                 surfaceView.mUpdateWindowNeeded = true;
                 surfaceView.mReportDrawNeeded   = true;
                 surfaceView.mHandler.sendEmptyMessage(UPDATE_WINDOW_MSG);
             }
             else
             {
                 if (surfaceView.mWinFrame.width() != w || surfaceView.mWinFrame.height() != h)
                 {
                     surfaceView.mUpdateWindowNeeded = true;
                     surfaceView.mHandler.sendEmptyMessage(UPDATE_WINDOW_MSG);
                 }
             }
         }
         finally
         {
             surfaceView.mSurfaceLock.unlock();
         }
     }
 }
示例#2
0
 /// <summary>
 /// Get the AppWidgetManager instance to use for the supplied
 /// <see cref="android.content.Context">Context</see>
 /// object.
 /// </summary>
 public static android.appwidget.AppWidgetManager getInstance(android.content.Context
                                                              context)
 {
     lock (sManagerCache)
     {
         if (sService == null)
         {
             android.os.IBinder b = android.os.ServiceManager.getService(android.content.Context
                                                                         .APPWIDGET_SERVICE);
             sService = android.appwidget.@internal.IAppWidgetServiceClass.Stub.asInterface(b);
         }
         [email protected] <android.appwidget.AppWidgetManager> @ref = sManagerCache
                                                                                  .get(context);
         android.appwidget.AppWidgetManager result = null;
         if (@ref != null)
         {
             result = @ref.get();
         }
         if (result == null)
         {
             result = new android.appwidget.AppWidgetManager(context);
             sManagerCache.put(context, new [email protected] <android.appwidget.AppWidgetManager
                                                                          >(result));
         }
         return(result);
     }
 }
示例#3
0
 public override void connected(android.content.ComponentName name, android.os.IBinder
                                service)
 {
     android.app.LoadedApk.ServiceDispatcher sd = mDispatcher.get();
     if (sd != null)
     {
         sd.connected(name, service);
     }
 }
示例#4
0
        /// <summary>Creates or retrieves a ColorStateList that always returns a single color.
        ///     </summary>
        /// <remarks>Creates or retrieves a ColorStateList that always returns a single color.
        ///     </remarks>
        public static android.content.res.ColorStateList valueOf(int color)
        {
            // TODO: should we collect these eventually?
            lock (sCache)
            {
                [email protected] <android.content.res.ColorStateList> @ref = sCache.get
                                                                                             (color);
                android.content.res.ColorStateList csl = @ref != null? @ref.get() : null;

                if (csl != null)
                {
                    return(csl);
                }
                csl = new android.content.res.ColorStateList(EMPTY, new int[] { color });
                sCache.put(color, new [email protected] <android.content.res.ColorStateList
                                                                    >(csl));
                return(csl);
            }
        }
示例#5
0
            public override void handleMessage(android.os.Message msg)
            {
                switch (msg.what)
                {
                case android.content.DialogInterfaceClass.BUTTON_POSITIVE:
                case android.content.DialogInterfaceClass.BUTTON_NEGATIVE:
                case android.content.DialogInterfaceClass.BUTTON_NEUTRAL:
                {
                    ((android.content.DialogInterfaceClass.OnClickListener)msg.obj).onClick(mDialog.get
                                                                                                (), msg.what);
                    break;
                }

                case MSG_DISMISS_DIALOG:
                {
                    ((android.content.DialogInterface)msg.obj).dismiss();
                    break;
                }
                }
            }