Closed ghost closed 8 years ago
This font seems to be working fine in my android app. I did the following:
weathericons-regular-webfont.ttf
into my assests folderweathericons.xml
into my values folder<TextView android:id="@+id/txvPrueba"
android:text="@string/wi_cloud"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
Typeface weatherFont = Typeface.createFromAsset(getContext().getAssets(), "fonts/weathericons.ttf");
txvPrueba.setTypeface(weatherFont);
Good to hear but how did you define your icons in the weathericons.xml?
I don't defined anything, just use https://github.com/erikflowers/weather-icons/blob/master/values/weathericons.xml
and put the resource in the TextView
txvPrueba.setText(context.getString(R.string.wi_cloudy));
I do not understand what you want to define
I see what I was doing wrong now. Appreciate your quick responses and guidance in solving my problem.
The font currently doesn't work with android devices like fontawesome does. Just using the identified shortcuts, f00d, doesn't produce anything. Not sure if I'm missing something. Any plans for a workable solution for mobile devices?