public void refreshGUI(String name) {

    try {
      mUtils.changeKeyBoardSettings();
    } catch (IllegalArgumentException e) {
      e.printStackTrace();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (NoSuchMethodException e) {
      e.printStackTrace();
    } catch (IllegalAccessException e) {
      e.printStackTrace();
    } catch (InvocationTargetException e) {
      e.printStackTrace();
    } catch (NoSuchFieldException e) {
      e.printStackTrace();
    }

    Global.logd(TAG + " name of string to be passed ! ");

    langSelection = name;
    setGuiLabels();
  }
  @Override
  public void onClick(View v) {
    switch (v.getId()) {
      case R.id.txtLeftMenuLink:
        Intent browserIntent =
            new Intent(Intent.ACTION_VIEW, Uri.parse("http://" + getString(R.string.site)));

        // changes as on 2nd Jan 2014
        StartActivity.currentIntent = browserIntent;
        // changes end here

        startActivity(browserIntent);
        Global.activityStartAnimationRightToLeft(SettingsActivity.this);
        break;

        // changes as on 15th July 2013
        // added this because of design changes
      case R.id.menuIcon:
        toggle();
        setSelectedView();
        break;

      case R.id.txtLanguage:
        setSelectedView();
        languageCall();
        break;

      case R.id.txtSectionSelection:
        setSelectedView();
        showSectionBox();
        break;

      case R.id.txtConfigureSettings:
        setSelectedView();
        Intent intent = new Intent(SettingsActivity.this, ConfigureServiceActivity.class);
        intent.putExtra(Global.FROM_ACTIVITY, TAG);
        startActivity(intent);
        // activity in animation
        Global.activityStartAnimationRightToLeft(SettingsActivity.this);
        break;

      case R.id.txtForceSync:
        setSelectedView();
        // sync all data
        GetAllDataAsyncTask getAllDataAsyncTask =
            new GetAllDataAsyncTask(SettingsActivity.this, Global.SETTINGS);
        getAllDataAsyncTask.execute();
        break;

      case R.id.txtSendLog:
        setSelectedView();
        InputStream is = mUtils.readFromLogFile();

        if (is != null) {
          sendLogAsyncTask = new SendLogAsyncTask(SettingsActivity.this, is);
          sendLogAsyncTask.execute();
        }

        break;

      case R.id.txtLogout:
        setSelectedView();
        callDialog(Global.FROM_EXIT);
        break;

      case R.id.lnrSectionSelection:
        showSectionBox();
        setSelectedView();
        break;

      case R.id.lnrLanguage:
        languageCall();
        setSelectedView();
        break;

      case R.id.txtSyncMenu:
        // sync just the menu
        showSyncDialogBox();
        setSelectedView();
        break;

      case R.id.btnPlaceOrderLeftMenu:
        // lead to the table selection list
        Prefs.addKey(Prefs.MENU_SELECTED, Global.TABLES);
        setSelectedView();
        intent = new Intent(this, TableListActivity.class);
        startActivity(intent);
        Global.activityStartAnimationRightToLeft(SettingsActivity.this);
        break;

      case R.id.txtSettingsLeftMenu:
        toggle();
        Prefs.addKey(Prefs.MENU_SELECTED, Global.SETTINGS);
        setSelectedView();
        break;

      case R.id.txtOrdersLeftMenu:
        Prefs.addKey(Prefs.MENU_SELECTED, Global.ORDERS);
        setSelectedView();
        finish();
        intent = new Intent(this, MyOrderActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK);
        startActivity(intent);
        Global.activityStartAnimationRightToLeft(SettingsActivity.this);
        break;

      case R.id.txtNotificationsLeftMenu:
        // take to the notification screen
        Prefs.addKey(Prefs.MENU_SELECTED, Global.NOTIFICATIONS);
        setSelectedView();
        intent = new Intent(this, NotificationListActivity.class);
        startActivity(intent);
        Global.activityStartAnimationRightToLeft(SettingsActivity.this);
        break;

      case R.id.relNotificationCentre:
        Prefs.addKey(Prefs.MENU_SELECTED, Global.NOTIFICATIONS);
        setSelectedView();
        intent = new Intent(this, NotificationListActivity.class);
        startActivity(intent);
        overridePendingTransition(R.anim.activity_in_anim, R.anim.activity_out_anim);
        break;

      case R.id.txtTablesLeftMenu:
        Prefs.addKey(Prefs.MENU_SELECTED, Global.TABLES);
        setSelectedView();
        intent = new Intent(this, TableListActivity.class);
        startActivity(intent);
        Global.activityStartAnimationRightToLeft(SettingsActivity.this);
        break;

      case R.id.btnLeftMenuLock:
        intent = new Intent(this, LoginActivity.class);
        intent.putExtra(Global.ACTION, Global.FROM_LOCK);
        startActivity(intent);
        Global.activityStartAnimationRightToLeft(SettingsActivity.this);
        break;

      case R.id.btnLeftMenuWaiterChange:
        callDialog(Global.FROM_CHANGE_WAITER_CODE);
        break;

      default:
        break;
    }
  }