open class BasicCompassView : AppCompatImageView, CompassView, OnClickListener
Button that represents 2D compass. When clicked, the map is set to north up. The button is visible only when map is not set to north up. Fade in / out animation is used to change button visibility.
BasicCompassView(context: Context!)
Default constructor that uses context to initialize this view by loading image resource and setting up on click listener. BasicCompassView(context: Context!, attrs: AttributeSet!)
Custom constructor that uses context to initialize this view by loading image resource and setting up on click listener. This constructor should be used to provide custom set of attributes. BasicCompassView(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)
Custom constructor that uses context to initialize this view by loading image resource and setting up on click listener. This constructor should be used to provide custom set of attributes and a reference to default style resource. |
static val COMPASS_NORTH_YAW_DEGREES: Float
The starting compass rotation when the image points on the north. |
open fun getView(): ImageView |
|
open fun hide(): Unit |
|
open fun onClick(view: View!): Unit |
|
open fun onRestoreInstanceState(state: Parcelable!): Unit |
|
open fun onSaveInstanceState(): Parcelable? |
|
open fun rotate(yawDegrees: Float): Unit |
|
open fun setMargins(left: Int, top: Int, right: Int, bottom: Int): Unit |
|
open fun setOnMapComponentClickCallback(callback: ClickableMapComponent.MapComponentClickCallback!): Unit |
|
open fun show(): Unit |
|
open fun startNorthUpAnimationIfApplicable(): Unit
Starts the animation if the compass has been rotated to point on North. In other cases this method will not have effect. It can be overridden to disable the |