private void OpenPage(int id)
        {
            // Configure timer component for selected page:
            if (id != DrawerListAdapter.TimerPageId)
            {
                Timer.HideAction   = true;
                Timer.HideDuration = false;
            }
            else
            {
                Timer.HideAction = false;
            }

            if (id == DrawerListAdapter.SettingsPageId)
            {
                DrawerListView.SetItemChecked(drawerAdapter.GetItemPosition(DrawerListAdapter.SettingsPageId), true);
                OpenFragment(settingsFragment.Value);
            }
            else
            {
                DrawerListView.SetItemChecked(drawerAdapter.GetItemPosition(DrawerListAdapter.TimerPageId), true);
                OpenFragment(trackingFragment.Value);
            }

            pageStack.Remove(id);
            pageStack.Add(id);
            // Make sure we don't store the timer page as the first page (this is implied)
            if (pageStack.Count == 1 && id == DrawerListAdapter.TimerPageId)
            {
                pageStack.Clear();
            }
        }
Beispiel #2
0
        private void SetMenuSelection(int pos)
        {
            int parentPos = drawerAdapter.GetParentPosition(pos - 1);

            DrawerListView.ClearChoices();
            if (parentPos > -1)
            {
                DrawerListView.ChoiceMode = (ChoiceMode)ListView.ChoiceModeMultiple;
                DrawerListView.SetItemChecked(parentPos, true);
                DrawerListView.SetItemChecked(pos, true);
            }
            else
            {
                DrawerListView.ChoiceMode = (ChoiceMode)ListView.ChoiceModeSingle;
                DrawerListView.SetItemChecked(pos, true);
            }
        }
 private void SetMenuSelection(int pos)
 {
     DrawerListView.ClearChoices();
     DrawerListView.ChoiceMode = (ChoiceMode)ListView.ChoiceModeSingle;
     DrawerListView.SetItemChecked(pos, true);
 }