/**
   * Bind ViewHolder
   *
   * @param holder ViewHolder object
   * @param data Object data to render
   * @param position position to render
   */
  @Override
  protected void bindHolder(NavigationItemMenuViewHolder holder, MenuItem data, int position) {
    try {
      holder.getLabel().setText(data.getLabel());

      if (data.isSelected()) {
        bindSelectedMenuItem(holder, position);
      } else {
        bindMenuItem(holder, position);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Пример #2
0
  @Override
  protected void onNavigationMenuItemTouchListener(
      com.bitdubai.fermat_api.layer.all_definition.navigation_structure.MenuItem data,
      int position) {
    try {
      String activityCode = data.getLinkToActivity().getCode();
      String appLickPublicKey = data.getAppLinkPublicKey();
      if (activityCode.equals("develop_mode")) {
        onBackPressed();
      } else changeActivity(activityCode, appLickPublicKey);
    } catch (Exception e) {

    }
  }