Code example for SparseArray

Methods: getput

0
		this.intersection = intersection;
		this.context = context;
	} 
 
	public Drawable getVehicle(int heading) {
		Drawable drawable = vehicles.get(heading);
		if (drawable == null) {
			drawable = createBusDrawable(heading);
			vehicles.put(heading, drawable);
		} 
		return drawable;
	} 
 
	private Drawable createBusDrawable(int heading) {
		//NOTE: 0, 0 is the bottom center point of the bus icon 
		 
		StateListDrawable stateListDrawable = new StateListDrawable();
		for (int[] state : validStates) {
			Bitmap bitmap = Bitmap.createBitmap(vehicle.getIntrinsicWidth(),
					vehicle.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
Stop searching for code, let great code find you!  Add Codota to your java IDE