public class

CalloutStyle

extends Object
java.lang.Object
   ↳ com.esri.android.map.CalloutStyle

Class Overview

Holds style parameters used by callout window.

Summary

Public Constructors
CalloutStyle()
This default constructor is provided for backward compatibility.
CalloutStyle(Context context)
This is the recommended constructor if you are constructing your own CalloutStyle objects.
CalloutStyle(Context context, AttributeSet attrs)
Constructor taking AttributeSet object obtained from an XML document.
Public Methods
int getAnchor()
Returns the anchor position style of the callout window.
int getBackgroundAlpha()
Returns the background color alpha of the callout window.
int getBackgroundColor()
Returns the background color of the callout window.
int getCornerCurve()
Returns the corner curve radius of the callout window in pixels.
int getCornerCurveDp(Context context)
Returns the corner curve radius of the callout window in density-independent pixels.
int getFrameColor()
Returns the frame color of the callout window.
int getMaxHeight()
Returns the maximum height of the callout window in pixels.
int getMaxHeightDp(Context context)
Returns the maximum height of the callout window in density-independent pixels.
int getMaxWidth()
Returns the maximum width of the callout window in pixels.
int getMaxWidthDp(Context context)
Returns the maximum width of the callout window in density-independent pixels.
int getTitleTextColor()
This method is deprecated. at 10.2.4 because callouts no longer have title text
int getTitleTextSize()
This method is deprecated. at 10.2.4 because callouts no longer have title text
int getTitleTextStyle()
This method is deprecated. at 10.2.4 because callouts no longer have title text
Typeface getTitleTextTypeFace()
This method is deprecated. at 10.2.4 because callouts no longer have title text
void setAnchor(int newAnchor)
Sets the position style of the anchor of the callout window.
void setBackgroundAlpha(int backgroundAlpha)
Sets the background alpha of the callout window.
void setBackgroundColor(int backgroundColor)
Sets the background color of the callout window.
void setCornerCurve(int cornerCurve)
Sets the corner curve radius of the callout window in pixels.
void setCornerCurveDp(int cornerCurve, Context context)
Sets the corner curve radius of the callout window in density-independent pixels.
void setFrameColor(int frameColor)
Sets the frame color of the callout window.
void setMaxHeight(int maxHeight)
Sets the maximum height of the callout window in pixels.
void setMaxHeightDp(int maxHeight, Context context)
Sets the maximum height of the callout window in density-independent pixels.
void setMaxWidth(int maxWidth)
Sets the maximum width of the callout window in pixels.
void setMaxWidthDp(int maxWidth, Context context)
Sets the maximum width of the callout window in density-independent pixels.
void setTitleTextColor(int titleTextColor)
This method is deprecated. at 10.2.4 because callouts no longer have title text
void setTitleTextSize(int titleTextSize)
This method is deprecated. at 10.2.4 because callouts no longer have title text
void setTitleTextStyle(int titleTextStyle)
This method is deprecated. at 10.2.4 because callouts no longer have title text
void setTitleTextTypeFace(Typeface titleTextTypeFace)
This method is deprecated. at 10.2.4 because callouts no longer have title text
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CalloutStyle ()

This default constructor is provided for backward compatibility. You are recommended to use the CalloutStyle(Context) constructor instead. The parameters will take default values as specified in CalloutStyle(Context), except the corner curve radius will default to 5 actual pixels.

public CalloutStyle (Context context)

This is the recommended constructor if you are constructing your own CalloutStyle objects. The parameters take default values as follows:

Parameter Default Value
Anchor position: ANCHOR_POSITION_LOWER_MIDDLE
Background alpha: 255
Background color: android.graphics.Color.WHITE
Corner curve radius: 5 density-independent pixels
Frame color: android.graphics.Color.BLACK
Max height: Full height of the MapView
Max width: Full width of the MapView

Parameters
context Context: the Context in which the callout window is displayed

public CalloutStyle (Context context, AttributeSet attrs)

Constructor taking AttributeSet object obtained from an XML document. Any parameters not included in the AttributeSet will take default values as specified in CalloutStyle(Context).

Parameters
context Context: Context object
attrs AttributeSet: AttributeSet object containing parameters and values to use

Public Methods

public int getAnchor ()

Returns the anchor position style of the callout window.

Returns
int one of the ANCHOR_POSITION constants defined in Callout

public int getBackgroundAlpha ()

Returns the background color alpha of the callout window.

Returns
int the background color alpha of the callout window

public int getBackgroundColor ()

Returns the background color of the callout window.

Returns
int the background color of the callout window

public int getCornerCurve ()

Returns the corner curve radius of the callout window in pixels.

Returns
int the corner curve radius of the callout window in pixels

public int getCornerCurveDp (Context context)

Returns the corner curve radius of the callout window in density-independent pixels.

Parameters
context Context: the Context in which the callout window is displayed
Returns
int the corner curve radius of the callout window in density-independent pixels

See also:

public int getFrameColor ()

Returns the frame color of the callout window.

Returns
int the frame color of the callout window

public int getMaxHeight ()

Returns the maximum height of the callout window in pixels.

Returns
int the maximum height of the callout window in pixels, or 0 if none has been set

public int getMaxHeightDp (Context context)

Returns the maximum height of the callout window in density-independent pixels.

Parameters
context Context: the Context in which the callout window is displayed
Returns
int the maximum height of the callout window in density-independent pixels, or 0 if none has been set

See also:

public int getMaxWidth ()

Returns the maximum width of the callout window in pixels.

Returns
int the maximum width of the callout window in pixels, or 0 if none has been set

public int getMaxWidthDp (Context context)

Returns the maximum width of the callout window in density-independent pixels.

Parameters
context Context: the Context in which the callout window is displayed
Returns
int the maximum width of the callout window in density-independent pixels, or 0 if none has been set

See also:

public int getTitleTextColor ()

This method is deprecated.
at 10.2.4 because callouts no longer have title text

Returns the color of title text of the callout window.

Returns
int the color of title text of the callout window

public int getTitleTextSize ()

This method is deprecated.
at 10.2.4 because callouts no longer have title text

Returns the size of title text of the callout window.

Returns
int the size of title text of the callout window in scaled pixels

public int getTitleTextStyle ()

This method is deprecated.
at 10.2.4 because callouts no longer have title text

Returns the style of title text of the callout window.

Returns
int the style of title text of the callout window

public Typeface getTitleTextTypeFace ()

This method is deprecated.
at 10.2.4 because callouts no longer have title text

Returns the type face of title text of the callout window.

Returns
Typeface the type face of title text of the callout window

public void setAnchor (int newAnchor)

Sets the position style of the anchor of the callout window. By default this is ANCHOR_POSITION_LOWER_MIDDLE.

Parameters
newAnchor int: one of the ANCHOR_POSITION constants defined in Callout

public void setBackgroundAlpha (int backgroundAlpha)

Sets the background alpha of the callout window. By default this is 255.

Parameters
backgroundAlpha int: the background color alpha of the callout window

public void setBackgroundColor (int backgroundColor)

Sets the background color of the callout window. By default this is white.

Parameters
backgroundColor int: the background color of the callout window

public void setCornerCurve (int cornerCurve)

Sets the corner curve radius of the callout window in pixels. By default this is 5 density-independent pixels.

Parameters
cornerCurve int: the corner curve radius of the callout window in pixels

public void setCornerCurveDp (int cornerCurve, Context context)

Sets the corner curve radius of the callout window in density-independent pixels. By default this is 5 density-independent pixels.

Parameters
cornerCurve int: the corner curve radius of the callout window in density-independent pixels
context Context: the Context in which the callout window is displayed

public void setFrameColor (int frameColor)

Sets the frame color of the callout window. By default this is black.

Parameters
frameColor int: the frame color of the callout window

public void setMaxHeight (int maxHeight)

Sets the maximum height of the callout window in pixels. By default it will stretch to accommodate the content that is to appear inside it, limited only by the height of the MapView.

Parameters
maxHeight int: the maximum height of the callout window in pixels

public void setMaxHeightDp (int maxHeight, Context context)

Sets the maximum height of the callout window in density-independent pixels. By default it will stretch to accommodate the content that is to appear inside it, limited only by the height of the MapView.

Parameters
maxHeight int: the maximum height of the callout window in density-independent pixels
context Context: the Context in which the callout window is displayed

See also:

public void setMaxWidth (int maxWidth)

Sets the maximum width of the callout window in pixels. By default it will stretch to accommodate the content that is to appear inside it, limited only by the width of the MapView.

Parameters
maxWidth int: the maximum width of the callout window in pixels

public void setMaxWidthDp (int maxWidth, Context context)

Sets the maximum width of the callout window in density-independent pixels. By default it will stretch to accommodate the content that is to appear inside it, limited only by the width of the MapView.

Parameters
maxWidth int: the maximum width of the callout window in density-independent pixels
context Context: the Context in which the callout window is displayed

See also:

public void setTitleTextColor (int titleTextColor)

This method is deprecated.
at 10.2.4 because callouts no longer have title text

Sets the color of title text of the callout window.

Parameters
titleTextColor int: the color of title text of the callout window

public void setTitleTextSize (int titleTextSize)

This method is deprecated.
at 10.2.4 because callouts no longer have title text

Sets the size of title text of the callout window.

Parameters
titleTextSize int: the size of title text of the callout window in scaled pixels

public void setTitleTextStyle (int titleTextStyle)

This method is deprecated.
at 10.2.4 because callouts no longer have title text

Sets the style of title text of the callout window.

Parameters
titleTextStyle int: the style of title text of the callout window

public void setTitleTextTypeFace (Typeface titleTextTypeFace)

This method is deprecated.
at 10.2.4 because callouts no longer have title text

Returns the type face of title text of the callout window.

Parameters
titleTextTypeFace Typeface: the type face of title text of the callout window