I'm starting in Android development and I got myself stocked in a problem...
I am trying to change the font of a Button in Android Studio, I've followed some tutorials closely but it didn't work.
Tutorials I followed:
Error trying to change font android studio
How to change the font on the TextView?
I don't receive any error message, it just doesn't work. Does anyone have any idea what I could be doing wrong?
Code:
Typeface font = Typeface.createFromAsset(getAssets(), "fonts/jua.ttf");
Button Button = (Button) findViewById(R.id.Button)
Button.setTypeface(font);
XML:
<Button
android:id="@+id/button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/my_button_bg"
android:text="Button"
android:textColor="@android:color/white"
android:textSize="15sp" />
Image of structure of folders:
Structure of folder - image