Code example for ListView

Methods: setSelection

0
		listview.setAdapter(adapter);
	} 
	 
	public void updateRank(int position) {
		adapter.setPositionFound(position);
		listview.setSelection(position);
	} 
	 
	public void updateAsyncTaskProgress(User u) {
		userList.add(u);
		adapter.notifyDataSetChanged();
	} 
	 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.leaderboard_menu, menu);
		return true; 
	}