public class SwitchIconView
extends AppCompatImageView
| Constructor and Description |
|---|
SwitchIconView(android.content.Context context) |
SwitchIconView(android.content.Context context,
android.util.AttributeSet attrs) |
SwitchIconView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isIconEnabled()
Check state
|
protected void |
onDraw(android.graphics.Canvas canvas) |
void |
onRestoreInstanceState(android.os.Parcelable state) |
android.os.Parcelable |
onSaveInstanceState() |
protected void |
onSizeChanged(int width,
int height,
int oldWidth,
int oldHeight) |
void |
setIconEnabled(boolean enabled)
Changes state with animation
|
void |
setIconEnabled(boolean enabled,
boolean animate)
Changes state
|
void |
switchState()
Switches icon state with animation
|
void |
switchState(boolean animate)
Switches icon state
|
public SwitchIconView(android.content.Context context)
public SwitchIconView(android.content.Context context,
android.util.AttributeSet attrs)
public SwitchIconView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
public void setIconEnabled(boolean enabled)
enabled - If TRUE - icon is enabledpublic void setIconEnabled(boolean enabled,
boolean animate)
enabled - If TRUE - icon is enabledpublic boolean isIconEnabled()
public void switchState()
public void switchState(boolean animate)
animate - Indicates that state will be changed with or without animationpublic android.os.Parcelable onSaveInstanceState()
public void onRestoreInstanceState(android.os.Parcelable state)
protected void onSizeChanged(int width,
int height,
int oldWidth,
int oldHeight)
protected void onDraw(android.graphics.Canvas canvas)