Import and set bradley hand for android app

I recently developed an iPhone app and trying to make a similar version to the android.

Everything goes well, apart from android doesn't supports bradley hand as a text font used on my buttons and labels.

I know you can possibly import your own text font, but I searched all over google and couldn't find any hints on:

  • How to do this, or perhaps an helpful tutorial somewhere online
  • But more importantly, where can I get the bradley hand font source to import?

I use eclipse SDK on mac.

Any senoirs can give me a help with it?

Cheers Phil

Answers


1) Create the folder assets/fonts in your project directory. 2) Place the font-file in the fonts directory 3) In the activity where you'd like to use the font, do this:

private static Typeface sTypeface; if (sTypeface == null) { sTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/you_font_filename.ttf"); } TextView mTextView = (TextView) findViewById(R.id.you_textview); mTextView .setTypeface(sTypeface);


Need Your Help

Calling class method from another class method

c# class

From my main code I'm calling a method of a class meth2 which calls another method from another class meth1. It is important for me to respect this structure.

Bootstrap 3 and Youtube in Modal

jquery css3 twitter-bootstrap youtube twitter-bootstrap-3

I'm trying to use the Modal feature from Bootstrap 3 to show my Youtube video. It works, but I can't click on any buttons in the Youtube video.