Skip to content

Instantly share code, notes, and snippets.

@molidev8
Last active December 7, 2022 18:29
Show Gist options
  • Save molidev8/68dbf1e5ee9d6b14a0910099da3d80c5 to your computer and use it in GitHub Desktop.
Save molidev8/68dbf1e5ee9d6b14a0910099da3d80c5 to your computer and use it in GitHub Desktop.
An attributes enumeration for a custom view
<declare-styleable name="CustomSwitch">
<attr name="switch_type" format="enum">
<enum name="vanilla" value="1" />
<enum name="small" value="2" />
<enum name="big" value="3" />
<enum name="pill" value="4" />
</attr>
<attr name="anim_text" format="boolean" />
<attr name="manual" format="boolean" />
<attr name="textVisible" format="boolean" />
<attr name="text" format="string" />
</declare-styleable>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment