Пример #1
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ComponentInjector.INSTANCE.getApplicationComponent().inject(this);

    if (appState != null && appState.getActiveCircle() != null) {
      users = appState.getActiveCircle().getUsers();
    }
  }
Пример #2
0
  private void setActivityToolbar() {
    if (isFragmentVisible) {
      activityCallback.onToolbarTitleChanged(appState.getActiveCircle().getTitle());

      int memberCount = appState.getActiveCircle().getUsers().size();
      activityCallback.onToolbarSubtitleChanged(
          getContext()
              .getResources()
              .getQuantityString(R.plurals.subtitle_circle_fragment, memberCount, memberCount));
    }
  }
Пример #3
0
 private void setAvatarBroadcastingAnimation(boolean isBroadcasting) {
   int avatarIndex = 0;
   for (User user : users) {
     if (user.getId().equals(appState.getActiveUser().getId())) {
       View avatar = getAvatarByPosition(avatarIndex);
       Log.d(TAG, "Setting broadcast animation for " + avatarIndex);
       avatarAdapter.setUserIsBroadcastingLocation(avatar, isBroadcasting);
     }
     avatarIndex++;
   }
 }
Пример #4
0
 /**
  * ******************************************************** Helpers
  * ********************************************************
  */
 private void update() {
   if (appState != null) {
     users = appState.getActiveCircle().getUsers();
     avatarAdapter.update(users);
   }
 }