blob: df7275dab18467817b35727525022d230d1453c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package cgeo.geocaching.ui;
import cgeo.geocaching.StoredList;
import cgeo.geocaching.network.HtmlImage;
import android.graphics.drawable.BitmapDrawable;
public class DirectionImage {
static private HtmlImage htmlImage = new HtmlImage(HtmlImage.SHARED, false, StoredList.STANDARD_LIST_ID, false);
/**
* Retrieve the direction image corresponding to the direction code.
*
* @param directionCode one of the eight cardinal points
* @return a drawable with the arrow pointing into the right direction
*/
public static BitmapDrawable getDrawable(final String directionCode) {
return htmlImage.getDrawable("http://www.geocaching.com/images/icons/compass/" + directionCode + ".gif");
}
}
|