app/src/main/java/com/adroitdevs/belanja/MainActivity.java
@Override
    public boolean onOptionsItemSelected(MenuItem item) {

        // Handle item selection
        switch (item.getItemId()) {
            case R.id.action_download:
                showProgressDialog(R.string.action_download, "Pulling changes from Cloudant");
                sTasks.startPullReplication();
                return true;
            case R.id.action_upload:
                showProgressDialog(R.string.action_upload, "Pushing Changes to Cloudant");
                sTasks.startPushReplication();
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }
// Handles interaction with the dropdown corner menu.
Handles interaction with the dropdown corner menu.
Handles interaction with the dropdown corner menu .
@Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.action_download:
                showProgressDialog(R.string.action_download, "Pulling changes from Cloudant");
                sTasks.startPullReplication();
                return true;
            case R.id.action_upload:
                showProgressDialog(R.string.action_upload, "Pushing Changes to Cloudant");
                sTasks.startPushReplication();
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }
@ Override public boolean onOptionsItemSelected ( MenuItem item ) { switch ( item . getItemId ( ) ) { case R . id . action_download : showProgressDialog ( R . string . action_download , "Pulling changes from Cloudant" ) ; sTasks . startPullReplication ( ) ; return true ; case R . id . action_upload : showProgressDialog ( R . string . action_upload , "Pushing Changes to Cloudant" ) ; sTasks . startPushReplication ( ) ; return true ; default : return super . onOptionsItemSelected ( item ) ; } }
Handles interaction with the dropdown corner menu.
Handles interaction with the dropdown corner menu .
// Handle item selection