code to add Helvetica font to our text on Textview in Android

///for doing this,frst download the Helvetica.ttf font and copy it on Assets folder.next write below code..
        Typeface font = Typeface.createFromAsset(getAssets(), "Helvetica.ttf");
        TextView myTextView1 = (TextView) findViewById(R.id.textView1);
        TextView myTextView2 = (TextView) findViewById(R.id.textView2);
        myTextView1.setTypeface(font,font.BOLD);
        myTextView2.setTypeface(font);

Comments

Popular posts from this blog

Custom Dialog with no title and full screen in Android

code to display .pdf,.text,.DOC,.DOCX,.doc extension files exists in SDCard

Best working code to set Date limits on Date Picker Dialog,in Android