public override bool onOptionsItemSelected(MenuItem item)
        {
            if (item.ItemId == COLOR_MENU_ID)
            {
                (new ColorPickerDialog(this, this, unchecked ((int)0xFFFF0000))).show();
                return(true);
            }
            else if (item.ItemId == CLEAR_MENU_ID)
            {
                mDrawingView.cleanup();
                mSegmentsRef.removeValue(new CompletionListenerAnonymousInnerClassHelper(this));

                return(true);
            }
            else if (item.ItemId == PIN_MENU_ID)
            {
                SyncedBoardManager.toggle(mFirebaseRef.child("boardsegments"), mBoardId);
                item.Checked = SyncedBoardManager.isSynced(mBoardId);
                return(true);
            }
            else
            {
                return(base.onOptionsItemSelected(item));
            }
        }
 protected internal override void onCreate(Bundle savedInstanceState)
 {
     base.onCreate(savedInstanceState);
     mRef       = new Firebase(FIREBASE_URL);
     mBoardsRef = mRef.child("boardmetas");
     mBoardsRef.keepSynced(true);             // keep the board list in sync
     mSegmentsRef = mRef.child("boardsegments");
     SyncedBoardManager.restoreSyncedBoards(mSegmentsRef);
     ContentView = R.layout.activity_board_list;
 }
        public override bool onCreateOptionsMenu(Menu menu)
        {
            base.onCreateOptionsMenu(menu);
            // getMenuInflater().inflate(R.menu.menu_drawing, menu);

            menu.add(0, COLOR_MENU_ID, 0, "Color").setShortcut('3', 'c').setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
            menu.add(0, CLEAR_MENU_ID, 2, "Clear").setShortcut('5', 'x');
            menu.add(0, PIN_MENU_ID, 3, "Keep in sync").setShortcut('6', 's').setIcon(android.R.drawable.ic_lock_lock).setCheckable(true).setChecked(SyncedBoardManager.isSynced(mBoardId));

            return(true);
        }
 public override void onClick(View v)
 {
     SyncedBoardManager.toggle(mSegmentsRef, key);
 }