Android Studio: Add Roboto Font on Your Android Project

Опубликовано: 02 Март 2026
на канале: DraftsBook
6,646
22

Here is the few steps to solve it:
1. Go to the android to project folder
2. Then goto app then src then main
3. Create two directory assets then fonts into the main folder.
4. Download your custom font ,I use Roboto Font link: https://material.io/guidelines/resour...

Add this method from your activity
t1=(TextView)findViewById(R.id.text1);
Typeface roboto = Typeface.createFromAsset(getAssets(), "fonts/Roboto-Bold.ttf");
t1.setTypeface(roboto);

That’s it 