Example #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.futureProjects);

            //Get the Toolbar id from the resources. -E157 T4.00
            projectToolbar          = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.projectsToolbar);
            futureEditText          = FindViewById <EditText>(Resource.Id.futureEditText);
            floatingActionButton    = FindViewById <Android.Support.Design.Widget.FloatingActionButton>(Resource.Id.addActionButton);
            projectBottomNavigation = FindViewById <Android.Support.Design.Widget.BottomNavigationView>(Resource.Id.projectbottom_navigation);
            listView = FindViewById <ListView>(Resource.Id.futureListView);

            //Bind the Bottom Navigatoin Menu page with the Project UI
            projectBottomNavigation.InflateMenu(Resource.Menu.projectBottomNavigation);
            //Create clicked event on the toolbar. -E157 T9.00
            projectToolbar.InflateMenu(Resource.Menu.projectsMenu);

            //Create clicked event on the toolbar. -E157 T9.00
            projectToolbar.MenuItemClick += ProjectToolbar_MenuItemClick;
            floatingActionButton.Click   += FloatingActionButton_Click;

            //Taking the database values and displaying that on the screen
            var lstSource = pdb.stringListViewProjects();
            var adapter   = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleListItem1, lstSource);

            listView.SetAdapter(adapter);
        }
Example #2
0
 private void BottomBarClickInit(ActivityIs curScreen)
 {
     BottomBar = FindViewById <SupportBottomBar>(Resource.Id.bottom_navigation_bar);
     BottomBar.Menu.GetItem((int)curScreen).SetChecked(true);
     BottomBar.NavigationItemSelected += BottomBar_Click;
 }