// Add Friends Fragment to Activity
  private void addFriendsFragment() {

    mFriendsFragment = new FriendsFragment();
    mFriendsFragment.setArguments(getIntent().getExtras());

    FragmentTransaction transaction = mFragmentManager.beginTransaction();
    transaction.add(R.id.fragment_container, mFriendsFragment);

    transaction.commit();
  }
Ejemplo n.º 2
0
  @Override
  public void notifyDataSetChanged() {
    super.notifyDataSetChanged();

    Set<String> friends = FriendsFragment.getFriends(context);

    data.clear();
    data.addAll(friends);

    super.notifyDataSetChanged();
  }