Ejemplo n.º 1
0
  /**
   * Add a new profile at a specific position to the list
   *
   * @param profile
   * @param position
   */
  public void addProfile(@NonNull IProfile profile, int position) {
    if (mAccountHeaderBuilder.mProfiles == null) {
      mAccountHeaderBuilder.mProfiles = new ArrayList<>();
    }
    mAccountHeaderBuilder.mProfiles.add(position, IdDistributor.checkId(profile));

    mAccountHeaderBuilder.updateHeaderAndList();
  }
Ejemplo n.º 2
0
  /**
   * Add new profiles to the existing list of profiles
   *
   * @param profiles
   */
  public void addProfiles(@NonNull IProfile... profiles) {
    if (mAccountHeaderBuilder.mProfiles == null) {
      mAccountHeaderBuilder.mProfiles = new ArrayList<>();
    }

    Collections.addAll(mAccountHeaderBuilder.mProfiles, IdDistributor.checkIds(profiles));

    mAccountHeaderBuilder.updateHeaderAndList();
  }
Ejemplo n.º 3
0
 /**
  * Set a new list of profiles for the header
  *
  * @param profiles
  */
 public void setProfiles(ArrayList<IProfile> profiles) {
   mAccountHeaderBuilder.mProfiles = IdDistributor.checkIds(profiles);
   mAccountHeaderBuilder.updateHeaderAndList();
 }