コード例 #1
0
        public static IGestureDetector NewInstance(Context context, IOnGestureListener listener)
        {
            int sdkVersion = (int)Android.OS.Build.VERSION.SdkInt;
            IGestureDetector detector;

            if (sdkVersion < (int)Android.OS.BuildVersionCodes.Eclair)
            {
                detector = new CupcakeGestureDetector(context);
            }
            else if (sdkVersion < (int)Android.OS.BuildVersionCodes.Froyo)
            {
                detector = new EclairGestureDetector(context);
            }
            else
            {
                detector = new FroyoGestureDetector(context);
            }

            detector.SetOnGestureListener(listener);

            return(detector);
        }
コード例 #2
0
 public OnScaleGestureListener(FroyoGestureDetector froyoGestureDetector)
 {
     this.froyoGestureDetector = froyoGestureDetector;
 }