Code example for SparseBooleanArray

Methods: clear

0
		activationStates.delete(stateId);
		notifyDataSetChanged();
	} 
	 
	public void deactivateAllGameStates() { 
		activationStates.clear();
		notifyDataSetChanged();
	} 
	 
	public void toggleGameStateActivation(int stateId) {
		if (isGameStateActivated(stateId)) {
			deactivateGameState(stateId);
		} else { 
			activateGameState(stateId);
		} 
	} 
	 
	public boolean isGameStateActivated(int stateId) {
		return activationStates.get(stateId, false);
	}