Exemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            hScrollView        = FindViewById <HorizontalScrollView>(Resource.Id.horizontalScrollView);
            customLinearLayout = new PanningZoomingApp.CustomLinearLayout(ApplicationContext);
            hScrollView.AddView(customLinearLayout);
            //TwoDScrollView twoDScrollView = new TwoDScrollView(ApplicationContext);
            //mlinearLayout = FindViewById<LinearLayout>(Resource.Id.parentview);
            //mlinearLayout.AddView(twoDScrollView);
        }
Exemplo n.º 2
0
        private void initTwoDScrollView()
        {
            mScroller = new Scroller(Context);
            mChild    = new PanningZoomingApp.CustomLinearLayout(Context);
            this.AddView(mChild);
            Focusable = true;
            DescendantFocusability = DescendantFocusability.AfterDescendants;
            SetWillNotDraw(false);
            ViewConfiguration configuration = ViewConfiguration.Get(Context);

            mTouchSlop       = configuration.ScaledTouchSlop;
            mMinimumVelocity = configuration.ScaledMinimumFlingVelocity;
            mMaximumVelocity = configuration.ScaledMaximumFlingVelocity;
        }