Hi Parry,
To use customize font in ListView in Android is in adapter of List getView
try to set typeface:
@Override
public View getView(int position, View convertView, ViewGroup parent) {
...
/* Font file is saved in path assets\fonts\ */
Typeface customTypeface =
Typeface.createFromAsset(context.getAssets(), "assets\fonts\vietnam.ttf");
...
/* Set custom typeface to text view you want to custom */
itemTextView.setTypeface(customTypeface );
...
}
※Notes:
Note that font android support is UTF-8
Hope it help,
DatNQ
On Fri, Apr 15, 2011 at 4:32 PM, Parry <[email protected]> wrote:
> Hi,
>
> I am comletely new to Android Programming.I just wanted to know how to
> use a particular font type for an item in List View in Android or in
> other words how to customize the font in ListView in Android.It would
> be really helpful if you could provide a code snippet to explain the
> same.
>
> Thanks,
> Parry
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en