Beispiel #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            // This activity will use a GestureOverlayView as it's content view. The layout file
            // will be added as a subview of this.
            GestureOverlayView gestureOverlayView = new GestureOverlayView(this);

            SetContentView(gestureOverlayView);

            // Load the binary gesture file that we created.
            _gestureLibrary = GestureLibraries.FromRawResource(this, Resource.Raw.gestures);
            if (!_gestureLibrary.Load())
            {
                Log.Wtf(GetType().FullName, "There was a problem loading the gesture library.");
                Finish();
            }

            // Load up the layout file for this activity and add it as child view of the
            // GestureOverlayView
            View view = LayoutInflater.Inflate(Resource.Layout.custom_gesture_layout, null);

            _imageView = view.FindViewById <ImageView> (Resource.Id.imageView1);
            gestureOverlayView.AddView(view);

            gestureOverlayView.GesturePerformed += GestureOverlayViewOnGesturePerformed;
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.gestures_list);

            mAdapter    = new GesturesAdapter(this);
            ListAdapter = mAdapter;

            if (sStore == null)
            {
                sStore = GestureLibraries.FromFile(mStoreFile);
            }
            mEmpty = (TextView)FindViewById(Android.Resource.Id.Empty);
            LoadGestures();

            RegisterForContextMenu(ListView);
        }