Exemple #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();
  }
Exemple #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();
  }
Exemple #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();
 }