Code example for SparseBooleanArray

Methods: size

0
	public boolean isGameStateActivated(int stateId) {
		return activationStates.get(stateId, false);
	} 
	 
	public boolean isAnyGameStateActivated() { 
		return activationStates.size() > 0;
	} 
	 
	private View getGameStateView(int index, View convertView, ViewGroup parentView) {
		TileGridView grid = null;
		GameState currentGameState = gameStateList.get((int) getItemId(index));
		 
		if (convertView == null) {
			convertView = inflater.inflate(ITEM_LAYOUT_ID, parentView, false);
			grid = (TileGridView)convertView.findViewById(GRID_ID);
			grid.create(currentGameState.getSize());
		} else if (convertView.getId() != ITEM_ID) {
			convertView = inflater.inflate(ITEM_LAYOUT_ID, parentView, false);
			grid = (TileGridView)convertView.findViewById(GRID_ID);
			grid.create(currentGameState.getSize());
		}