I canβt link to my image in the transfer folder. I have an image there, however, I keep getting the error message that I cannot convert int to Drawable. my created R.java file has a line for the image, but it is set as "public static final int restaurant = 0x7f020001;"
package com.CS3040.Places; import android.content.Context; import android.graphics.BitmapFactory; import android.graphics.drawable.Drawable; import com.CS3040.*; import com.CS3040.Coursework.R; import com.google.android.maps.GeoPoint; import com.google.android.maps.OverlayItem; public class PlaceOverlayItem extends OverlayItem { private final GeoPoint point; private final Place place; private final Drawable marker; public PlaceOverlayItem(Place p, String type) { super(p.getGeoPoint(), p.getName(), p.getFormatted_address()); if(type.equals("restaurant")){ this.marker = R.drawable.restaurant; }
source share