Skip to content

Add IconImageView and IconImageButton#147

Open
1zaman wants to merge 1 commit into
JoanZapata:developfrom
1zaman:icon-image-view
Open

Add IconImageView and IconImageButton#147
1zaman wants to merge 1 commit into
JoanZapata:developfrom
1zaman:icon-image-view

Conversation

@1zaman
Copy link
Copy Markdown
Contributor

@1zaman 1zaman commented Dec 16, 2015

Although single icons can be rendered as text in text views, it requires setting a fixed size. Using a drawable allows it to automatically scale according to the size of the widget. Therefore, this pull request introduces IconImageView and IconImageButton to enable using the drawable in XML. They also define custom attributes for the icon properties, which improves readability and extendibility. Furthermore, extending ImageView and ImageButton provides easy inoperability with other drawables (i.e when switching between XML drawable resources and IconDrawable).

Resolves #132

Although single icons can be rendered as text in text views, it requires
setting a fixed size. Using a drawable allows it to automatically scale
according to the size of the widget. Therefore, this commit introduces
IconImageView and IconImageButton to enable using the drawable in XML.
They also define custom attributes for the icon properties, which
improves readability and extendibility. Furthermore, extending ImageView
and ImageButton provides easy inoperability with other drawables (i.e
when switching between XML drawable resources and IconDrawable).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant