Code example for PagerAdapter

Methods: notifyDataSetChanged

0
 
	private List<View> views = null;
	private boolean isEndless = false;
	private int count = 0;
 
	public EndlessPagerAdapter(List<View> views) {
		setNewData(views);
	} 
 
	public void setNewData(List<View> views) {
		this.views = views;
		count = (isEndless ? Integer.MAX_VALUE : this.views.size());
		this.notifyDataSetChanged();
	} 
 
	@Override 
	public int getCount() { 
		return count;
	} 
 
	public void setEndless(boolean isEndless) {