public class

CircledImageView

extends View

Note: The Wearable Support Library classes under the android.support.wearable package are subject to change. For the full Android API reference, see Reference.

java.lang.Object
   ↳ android.view.View
     ↳ android.support.wearable.view.CircledImageView
Known Direct Subclasses

Class Overview

An image view surrounded by a circle.

Summary

[Expand]
Inherited Constants
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
CircledImageView(Context context)
CircledImageView(Context context, AttributeSet attrs)
CircledImageView(Context context, AttributeSet attrs, int defStyle)
Public Methods
ColorStateList getCircleColorStateList()
float getCircleRadius()
long getColorChangeAnimationDuration()
int getDefaultCircleColor()
Drawable getImageDrawable()
float getInitialCircleRadius()
void setCircleBorderColor(int circleBorderColor)
void setCircleBorderWidth(float circleBorderWidth)
Set the border around the circle.
void setCircleColor(int circleColor)
void setCircleColorStateList(ColorStateList circleColor)
void setCircleHidden(boolean circleHidden)
void setCircleRadius(float circleRadius)
void setCircleRadiusPressed(float circleRadiusPressed)
void setColorChangeAnimationDuration(long mColorChangeAnimationDurationMs)
void setImageDrawable(Drawable drawable)
void setImageResource(int resId)
void setPressed(boolean pressed)
void setProgress(float progress)
void setShadowVisibility(float shadowVisibility)
Set how much of the shadow should be shown.
void showIndeterminateProgress(boolean show)
Show the circle border as an indeterminate progress spinner.
Protected Methods
void drawableStateChanged()
void onDraw(Canvas canvas)
void onLayout(boolean changed, int left, int top, int right, int bottom)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
boolean onSetAlpha(int alpha)
void onVisibilityChanged(View changedView, int visibility)
[Expand]
Inherited Methods
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public CircledImageView (Context context)

public CircledImageView (Context context, AttributeSet attrs)

public CircledImageView (Context context, AttributeSet attrs, int defStyle)

Public Methods

public ColorStateList getCircleColorStateList ()

public float getCircleRadius ()

public long getColorChangeAnimationDuration ()

Returns
  • the milliseconds duration of the transition animation when the color changes.

public int getDefaultCircleColor ()

public Drawable getImageDrawable ()

public float getInitialCircleRadius ()

public void setCircleBorderColor (int circleBorderColor)

public void setCircleBorderWidth (float circleBorderWidth)

Set the border around the circle.

Parameters
circleBorderWidth Width of the border around the circle.

public void setCircleColor (int circleColor)

public void setCircleColorStateList (ColorStateList circleColor)

public void setCircleHidden (boolean circleHidden)

public void setCircleRadius (float circleRadius)

public void setCircleRadiusPressed (float circleRadiusPressed)

public void setColorChangeAnimationDuration (long mColorChangeAnimationDurationMs)

Parameters
mColorChangeAnimationDurationMs the milliseconds duration of the color change animation. The color change animation will run if the color changes with setCircleColor(int) or as a result of the active state changing.

public void setImageDrawable (Drawable drawable)

public void setImageResource (int resId)

public void setPressed (boolean pressed)

public void setProgress (float progress)

public void setShadowVisibility (float shadowVisibility)

Set how much of the shadow should be shown.

Parameters
shadowVisibility Value between 0 and 1.

public void showIndeterminateProgress (boolean show)

Show the circle border as an indeterminate progress spinner. The views circle border width and color must be set for this to have an effect.

Parameters
show true if the progress spinner is shown, false to hide it.

Protected Methods

protected void drawableStateChanged ()

protected void onDraw (Canvas canvas)

protected void onLayout (boolean changed, int left, int top, int right, int bottom)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)

protected boolean onSetAlpha (int alpha)

protected void onVisibilityChanged (View changedView, int visibility)