Code example for FragmentStatePagerAdapter

Methods: getItem, notifyDataSetChanged

0
	} 
 
	public void addedNewCard(Card newCard) {
		cards.add(newCard);
 
		fm.beginTransaction().remove(this.getItem(cards.size())).commit();
		// fm.beginTransaction().add(new CardFragment(newCard), "IDK").commit(); 
		notifyDataSetChanged(); 
	} 
}