Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IconImageView and IconImageButton #147

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

1zaman
Copy link
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