Skip to content

Instantly share code, notes, and snippets.

@stramek
Created October 17, 2017 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stramek/84415cc587ac7e0d999f2f3d9be6c2e3 to your computer and use it in GitHub Desktop.
Save stramek/84415cc587ac7e0d999f2f3d9be6c2e3 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp"
android:orientation="vertical">
<TextView
android:id="@+id/textXML"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="This font was set via XML"
android:textSize="30sp" />
<TextView
android:id="@+id/textCode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="This font was set via code"
android:textSize="30sp" />
<Button
android:id="@+id/changeFontButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Change font programmatically"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment