Class SettingItemView
-
- All Implemented Interfaces:
public class SettingItemView
-
-
Constructor Summary
Constructors Constructor Description SettingItemView(Context context)SettingItemView(Context context, AttributeSet attrs)SettingItemView(Context context, AttributeSet attrs, int defStyleAttr)
-
Method Summary
Modifier and Type Method Description voidsetRightImageVisibility(int visibility)Set the visibility of the right image voidsetTagImageVisibility(int visibility)Set the visibility of the tag image voidsetTagImage(int resId)Set the tag image resource voidsetSwitchButtonVisibility(int visibility)Set the visibility of the switch button voidsetSwitchCheckListener(OnCheckedChangeListener listener)Set the switch button checked change listener voidsetSwitchTouchListener(OnTouchListener listener)voidsetValueVisibility(int visibility)Set the visibility of the value text voidsetValue(int resId)Set the value text from a string resource voidsetValue(String value)Set the value text TextViewgetValueView()Get the value TextView for customizing text color StringgetValue()Get the value text voidsetContent(int resId)Set the content text from a string resource voidsetContent(String content)Set the content text voidsetImageVisibility(int visibility)Set the visibility of the left image voidsetImage(int resId)Set the left image resource voidsetChecked(boolean isChecked)Set the switch button checked state voidsetCheckedWithOutEvent(boolean isChecked)Set the switch button checked state without triggering the checked change event voidsetCheckedImmediately(boolean isChecked)Set the switch button checked state immediately without animation voidsetCheckedImmediatelyWithOutEvent(boolean isChecked)Set the switch button checked state immediately without animation or triggering the checked change event booleanisChecked()Get the current switch checked state voidsetSelected(boolean selected)voidsetSelectImage(Uri uri)ImageViewgetSelectImage()-
-
Method Detail
-
setRightImageVisibility
void setRightImageVisibility(int visibility)
Set the visibility of the right image
- Parameters:
visibility- visibility value
-
setTagImageVisibility
void setTagImageVisibility(int visibility)
Set the visibility of the tag image
- Parameters:
visibility- visibility value
-
setTagImage
void setTagImage(int resId)
Set the tag image resource
- Parameters:
resId- resource ID
-
setSwitchButtonVisibility
void setSwitchButtonVisibility(int visibility)
Set the visibility of the switch button
- Parameters:
visibility- visibility value
-
setSwitchCheckListener
void setSwitchCheckListener(OnCheckedChangeListener listener)
Set the switch button checked change listener
- Parameters:
listener- the listener
-
setSwitchTouchListener
void setSwitchTouchListener(OnTouchListener listener)
-
setValueVisibility
void setValueVisibility(int visibility)
Set the visibility of the value text
- Parameters:
visibility- visibility value
-
setValue
void setValue(int resId)
Set the value text from a string resource
- Parameters:
resId- string resource ID
-
setValue
void setValue(String value)
Set the value text
- Parameters:
value- the value text
-
getValueView
TextView getValueView()
Get the value TextView for customizing text color
-
getValue
String getValue()
Get the value text
- Returns:
the value string
-
setContent
void setContent(int resId)
Set the content text from a string resource
- Parameters:
resId- string resource ID
-
setContent
void setContent(String content)
Set the content text
- Parameters:
content- the content text
-
setImageVisibility
void setImageVisibility(int visibility)
Set the visibility of the left image
- Parameters:
visibility- visibility value
-
setImage
void setImage(int resId)
Set the left image resource
- Parameters:
resId- resource ID
-
setChecked
void setChecked(boolean isChecked)
Set the switch button checked state
- Parameters:
isChecked- whether checked
-
setCheckedWithOutEvent
void setCheckedWithOutEvent(boolean isChecked)
Set the switch button checked state without triggering the checked change event
- Parameters:
isChecked- whether checked
-
setCheckedImmediately
void setCheckedImmediately(boolean isChecked)
Set the switch button checked state immediately without animation
- Parameters:
isChecked- whether checked
-
setCheckedImmediatelyWithOutEvent
void setCheckedImmediatelyWithOutEvent(boolean isChecked)
Set the switch button checked state immediately without animation or triggering the checked change event
- Parameters:
isChecked- whether checked
-
isChecked
boolean isChecked()
Get the current switch checked state
-
setSelected
void setSelected(boolean selected)
-
setSelectImage
void setSelectImage(Uri uri)
-
getSelectImage
ImageView getSelectImage()
-
-
-
-