Skip to content

Instantly share code, notes, and snippets.

@VladSem
Created October 31, 2016 06:18
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 VladSem/1b43fe6655f2b363275daf7b1e84626b to your computer and use it in GitHub Desktop.
Save VladSem/1b43fe6655f2b363275daf7b1e84626b to your computer and use it in GitHub Desktop.
package com.android.happyhalloween;
import android.graphics.Typeface;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView tx1 = (TextView)findViewById(R.id.text_view1);
TextView tx2 = (TextView)findViewById(R.id.text_view2);
Typeface halloween_font = Typeface.createFromAsset(getAssets(), "fonts/halloween.ttf");
tx1.setTypeface(halloween_font);
tx2.setTypeface(halloween_font);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment