Android-IcoButton - Custom view for Android that gives sensible easy buttons

  •        0

1. Positioning the icon to the immediate "left of your text", "right of your text" or the more standard "left" and "right" extremes of the button .2. Auto resizing of the icon to match the size of your text (the text is really the more important part of this button, so it made sense to size the icon accordingly).3. Automatic clicked/pressed states for your button (you only supply the color to the button, and it auto-figures out a darker color for the pressed state).4. If you find the default attributes limiting, you can go ahead and add a nested `TextView` or `ImageView` in your xml, and you get precise control of how the individual parts should look like.5. It's a [Custom Composite View]( (so much more efficient and performant than say a LinearLayout/RelativeLayout).6. Tested code. This was more of a fun project for me so I went all in and wrote pretty comprehensive tests for the positioning. Look at the `` for the juicy details (with ascii diagrams and all).7. Super readable code!![Android IcoButtons]( =500x)



comments powered by Disqus

Related Projects

Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.

Tag Cloud >>