public class DefaultResourceProxyImpl extends Object implements ResourceProxy, MapViewConstants
ResourceProxy
that returns fixed string to get
string resources and reads the jar package to get bitmap resources.ResourceProxy.bitmap, ResourceProxy.string
ANIMATION_DURATION_DEFAULT, ANIMATION_DURATION_LONG, ANIMATION_DURATION_SHORT, ANIMATION_SMOOTHNESS_DEFAULT, ANIMATION_SMOOTHNESS_HIGH, ANIMATION_SMOOTHNESS_LOW, DEBUGMODE, MINIMUM_ZOOMLEVEL, NOT_SET
Constructor and Description |
---|
DefaultResourceProxyImpl(android.content.Context pContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
android.graphics.Bitmap |
getBitmap(ResourceProxy.bitmap pResId) |
float |
getDisplayMetricsDensity()
Gets the density from the current screen's DisplayMetrics
|
android.graphics.drawable.Drawable |
getDrawable(ResourceProxy.bitmap pResId)
Get a bitmap as a
Drawable |
String |
getString(ResourceProxy.string pResId) |
String |
getString(ResourceProxy.string pResId,
Object... formatArgs)
Use a string resource as a format definition, and format using the supplied format arguments.
|
public DefaultResourceProxyImpl(android.content.Context pContext)
pContext
- Used to get the display metrics that are used for scaling the bitmaps returned by
getBitmap(org.osmdroid.ResourceProxy.bitmap)
and getDrawable(org.osmdroid.ResourceProxy.bitmap)
.
Can be null, in which case the bitmaps are not scaled.public String getString(ResourceProxy.string pResId)
getString
in interface ResourceProxy
public String getString(ResourceProxy.string pResId, Object... formatArgs)
ResourceProxy
getString
in interface ResourceProxy
public android.graphics.Bitmap getBitmap(ResourceProxy.bitmap pResId)
getBitmap
in interface ResourceProxy
public android.graphics.drawable.Drawable getDrawable(ResourceProxy.bitmap pResId)
ResourceProxy
Drawable
getDrawable
in interface ResourceProxy
public float getDisplayMetricsDensity()
ResourceProxy
getDisplayMetricsDensity
in interface ResourceProxy
Copyright © 2015. All Rights Reserved.