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

Android: wind direction? #176

Open
kpagcha opened this issue Oct 31, 2016 · 4 comments
Open

Android: wind direction? #176

kpagcha opened this issue Oct 31, 2016 · 4 comments

Comments

@kpagcha
Copy link

kpagcha commented Oct 31, 2016

I am trying to use the wind direction icons, but they all share the same content element (f0b1), so how can I include them in my strings.xml file?

@erikflowers
Copy link
Owner

It is meant to use CSS transforms to rotate them. No idea how you would rotate them in a native app. Just apply a transform to the degree you need it? like 90 degrees would go from pointing upwards, to pointing to the right. But I have no idea how it works, that's just a guess.

@kpagcha
Copy link
Author

kpagcha commented Oct 31, 2016

Alright I figured out how to do it, using rotate animations with a duration of 0 (default):

RotateAnimation rotate = new RotateAnimation(0f, deg, Animation.RELATIVE_TO_SELF, 0.5f,
    Animation.RELATIVE_TO_SELF, 0.5f);
rotate.setFillAfter(true);
windIcon.setAnimation(rotate);
windIcon.setIcon(getActivity().getString(R.string.wind_icon));

@olkunmustafa
Copy link

Hi @kpagcha

I couldn't show icons in my Android app even though I write unicode text in my strings.xml files it is shown as "f07d". how did you solve this problem ?

@Sujal1
Copy link

Sujal1 commented Feb 23, 2017

@olkunmustafa In your strings.xml, rewrite it as &#xf07d

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

No branches or pull requests

4 participants