Class SettingItemView

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void setRightImageVisibility(int visibility) Set the visibility of the right image
      void setTagImageVisibility(int visibility) Set the visibility of the tag image
      void setTagImage(int resId) Set the tag image resource
      void setSwitchButtonVisibility(int visibility) Set the visibility of the switch button
      void setSwitchCheckListener(OnCheckedChangeListener listener) Set the switch button checked change listener
      void setSwitchTouchListener(OnTouchListener listener)
      void setValueVisibility(int visibility) Set the visibility of the value text
      void setValue(int resId) Set the value text from a string resource
      void setValue(String value) Set the value text
      TextView getValueView() Get the value TextView for customizing text color
      String getValue() Get the value text
      void setContent(int resId) Set the content text from a string resource
      void setContent(String content) Set the content text
      void setImageVisibility(int visibility) Set the visibility of the left image
      void setImage(int resId) Set the left image resource
      void setChecked(boolean isChecked) Set the switch button checked state
      void setCheckedWithOutEvent(boolean isChecked) Set the switch button checked state without triggering the checked change event
      void setCheckedImmediately(boolean isChecked) Set the switch button checked state immediately without animation
      void setCheckedImmediatelyWithOutEvent(boolean isChecked) Set the switch button checked state immediately without animation or triggering the checked change event
      boolean isChecked() Get the current switch checked state
      void setSelected(boolean selected)
      void setSelectImage(Uri uri)
      ImageView getSelectImage()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SettingItemView

        SettingItemView(Context context)
      • SettingItemView

        SettingItemView(Context context, AttributeSet attrs)
      • SettingItemView

        SettingItemView(Context context, AttributeSet attrs, int defStyleAttr)
    • 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
      • 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