JoanZapata / android-iconify

Android integration of multiple icon providers such as FontAwesome, Entypo, Typicons,...
http://joanzapata.com/android-iconify
Other
3.93k stars 526 forks source link

Auto-mirroring support in RTL mode #86

Closed 1zaman closed 9 years ago

1zaman commented 9 years ago

IconDrawable has been modified to support auto-mirroring by default if supported by the icon. I have also added an IconImageView widget with custom attributes at edx/edx-app-android@d2d4fc6084ba63b3d5bda40a7c2b45258a16b778 to support XML definitions, but in order to add that here this project would need to be changed to an Android library module, which I don't have any experience with and probably requires integrating with Gradle. If you or someone else manages to make this transition, I'll be happy to include that commit here as well.

JoanZapata commented 9 years ago

Thanks for contributing your changes, however I don't think all icons should be mirrored to support RTL. Logos, for example, should not. I'm closing this PR for now, feel free to reopen if you can take the time to only mirror the few icons that make sense (arrows I guess). :)

1zaman commented 9 years ago

I have already defined the icons that don’t support RTL as non-mirrorable. Please take a look at c5fb9b7823dc99781f6e39964b68f5ec94de2a24

On 22-Jun-2015, at 12:09 pm, Joan Zapata notifications@github.com wrote:

Thanks for contributing your changes, however I don't think all icons should be mirrored to support RTL. Logos, for example, should not. I'm closing this PR for now, feel free to reopen if you can take the time to only mirror the few icons that make sense (arrows I guess). :)

β€” Reply to this email directly or view it on GitHub https://github.com/JoanZapata/android-iconify/pull/86#issuecomment-114024524.

JoanZapata commented 9 years ago

Oops! My bad, sorry, checked a little bit too fast. It's perfect thank you. :)

1zaman commented 9 years ago

Thanks for merging. Do you have any plans of converting it into an Android module?

On Mon, Jun 22, 2015 at 12:20 PM, Joan Zapata notifications@github.com wrote:

Oops! My bad, sorry, checked a little bit too fast. It's perfect thank you. :)

β€” Reply to this email directly or view it on GitHub https://github.com/JoanZapata/android-iconify/pull/86#issuecomment-114026267 .

JoanZapata commented 9 years ago

At the time I created the lib a jar made the build faster than an apklib (or aar). I don't know if that's still the case, but I don't have any plan. Why?

1zaman commented 9 years ago

If this library is converted to an AAR, then we can include custom attribute definitions, such as the iconName enums for my IconImageView at edx/edx-app-android@d2d4fc6084ba63b3d5bda40a7c2b45258a16b778. Lacking this option, the IconDrawable cannot be used from XML layouts, which makes it more cumbersome to use globally.

1zaman commented 8 years ago

While this seems to have been reverted during the Font Awesome 4.4.0 upgrade, I have updated my branch to merge all the latest changes on develop, including support for new icon sets and CustomTypefaceSpan. I might or might not keep it updated in the future, as currently I only use Font Awesome icons, and don't really need to keep that updated either.

JoanZapata commented 8 years ago

Yes sorry I reverted it because it makes updating the font libraries way too long and I can't afford to spend that much time on it.

1zaman commented 8 years ago

That's understandable. You could retain the functionality though, and just disable it for your own modules (or enable it for specific fonts that aren't updated often or don't have large updates). That would allow me to use your main module in my project (after my other pull requests are merged πŸ˜‰), while using my own font module implementation. Other people might also benefit from this feature.

On Fri, Dec 18, 2015 at 1:17 PM, Joan Zapata notifications@github.com wrote:

Yes sorry I reverted it because it makes updating the font libraries way too long and I can't afford to spend that much time on it.

β€” Reply to this email directly or view it on GitHub https://github.com/JoanZapata/android-iconify/pull/86#issuecomment-165711459 .