Beispiel #1
0
        public LiveOrdersLayout(Context context) : base(context)
        {
            this.Orientation = Orientation.Horizontal;
            this.SetBackgroundColor(Color.White);

            FrameLayout leftFrame = new FrameLayout(context);

            leftFrame.Id = 1;
            leftFrame.SetMinimumHeight(500);
            leftFrame.SetMinimumWidth(700);
            leftFrame.SetBackgroundColor(Color.White);
            this.AddView(leftFrame);

            FrameLayout rightFrame = new FrameLayout(context);

            rightFrame.Id = 2;
            rightFrame.SetMinimumHeight(700);
            rightFrame.SetMinimumWidth(1190);
            rightFrame.SetBackgroundColor(Color.White);

            this.AddView(rightFrame);

            ordersFragment = new LiveOrdersFragment();
            orderFragment  = new OrderFragment();

            Activity activity = (Activity)context;

            FragmentTransaction ft = activity.FragmentManager.BeginTransaction();

            ft.Add(leftFrame.Id, ordersFragment);
            ft.Add(rightFrame.Id, orderFragment);
            ft.Commit();
        }
Beispiel #2
0
        public CurrentOrderLayout(Context context) : base(context)
        {
            Orientation = Android.Widget.Orientation.Vertical;
            SetMinimumHeight(500);
            SetMinimumWidth(1920);
            SetBackgroundColor(Color.White);

            LinearLayout frames = new LinearLayout(context);

            frames.Orientation = Android.Widget.Orientation.Horizontal;

            leftFrame    = new FrameLayout(frames.Context);
            leftFrame.Id = 1;
            leftFrame.SetMinimumHeight(500);
            leftFrame.SetMinimumWidth(850);
            leftFrame.SetBackgroundColor(Color.White);
            frames.AddView(leftFrame);

            rightFrame    = new FrameLayout(frames.Context);
            rightFrame.Id = 2;
            rightFrame.SetMinimumHeight(700);
            rightFrame.SetMinimumWidth(1040);
            rightFrame.SetBackgroundColor(Color.White);
            frames.AddView(rightFrame);

            AddView(frames);

            VariationsFragment variationsFragment = new VariationsFragment(1);

            leftFragment  = variationsFragment;
            orderFragment = new OrderFragment();

            Activity activity = (Activity)context;

            FragmentTransaction ft = activity.FragmentManager.BeginTransaction();

            ft.Add(leftFrame.Id, variationsFragment);
            ft.Add(rightFrame.Id, orderFragment);
            ft.Commit();
        }