public final class CompassView extends ImageView implements Runnable
You can change the behaviour of this View during initialisation with
MapboxMapOptions
, and xml attributes. While running you can
use UiSettings
.
Modifier and Type | Field and Description |
---|---|
static long |
TIME_MAP_NORTH_ANIMATION |
static long |
TIME_WAIT_IDLE |
Constructor and Description |
---|
CompassView(Context context) |
CompassView(Context context,
AttributeSet attrs) |
CompassView(Context context,
AttributeSet attrs,
int defStyleAttr) |
Modifier and Type | Method and Description |
---|---|
void |
fadeCompassViewFacingNorth(boolean compassFadeFacingNorth) |
Drawable |
getCompassImage()
Get the current configured CompassView image.
|
void |
injectCompassAnimationListener(MapboxMap.OnCompassAnimationListener compassAnimationListener) |
void |
isAnimating(boolean isAnimating) |
boolean |
isFacingNorth() |
boolean |
isFadeCompassViewFacingNorth() |
boolean |
isHidden() |
void |
run() |
void |
setCompassImage(Drawable compass)
Set the CompassView image.
|
void |
setEnabled(boolean enabled) |
void |
update(double bearing)
Updates the direction of the compass.
|
public static final long TIME_WAIT_IDLE
public static final long TIME_MAP_NORTH_ANIMATION
public CompassView(Context context)
public CompassView(Context context, AttributeSet attrs)
public CompassView(Context context, AttributeSet attrs, int defStyleAttr)
public void injectCompassAnimationListener(MapboxMap.OnCompassAnimationListener compassAnimationListener)
public void isAnimating(boolean isAnimating)
public boolean isHidden()
public boolean isFacingNorth()
public void setEnabled(boolean enabled)
public void update(double bearing)
bearing
- the direction value of the mappublic void fadeCompassViewFacingNorth(boolean compassFadeFacingNorth)
public boolean isFadeCompassViewFacingNorth()
public void setCompassImage(Drawable compass)
compass
- the drawable to use as compass imagepublic Drawable getCompassImage()
© 2015–2018 Mapbox. All rights reserved.