예제 #1
0
        private void SetView(ViewSelect vs)
        {
            if ((viewSelect == vs) && (!init))
            {
                return;
            }

            viewSelect = vs;

            init = false;

            switch (vs)
            {
            case ViewSelect.CARD_VIEW:
                ShowMainViewFragment(quotePanelFragment = QuotePanelFragment.NewInstance(), Resource.Id.bottomFrameLayout);
                break;

            case ViewSelect.GRID_VIEW:
                ShowMainViewFragment(PortfolioDataGridFragment.NewInstance(), Resource.Id.bottomFrameLayout);
                break;

            default:
                break;
            }
        }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.main);

            var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            if (toolbar != null)
            {
                SetSupportActionBar(toolbar);
                ShowHamurgerIcon();
                //Set hamburger items menu
                SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_menu_white_18dp);
                SupportActionBar.Subtitle = "TEST";
            }

            totalValue = FindViewById <TextView>(Resource.Id.textView7);

            mainToolBar = toolbar;

            // Create your application here
            floatingAddButton = FindViewById <FloatingActionButton>(Resource.Id.floatingAddButton);

            floatingAddButton.Click += (sender, e) =>
            {
                Android.Support.V7.App.AlertDialog.Builder alertDialog = new Android.Support.V7.App.AlertDialog.Builder(this);
                alertDialog.SetPositiveButton("Ok", (senderAlert, args) => { });
                alertDialog.SetMessage("test");

                alertDialog.Show();
            };

            ShowMainViewFragment(QuotePanelFragment.NewInstance(), Resource.Id.bottomFrameLayout);

            //PortfolioChartsFragment chartsFragment = PortfolioChartsFragment.NewInstance();

            //ShowMainViewFragment(chartsFragment, Resource.Id.middleFrameLayout);
        }