Created
October 31, 2016 06:18
-
-
Save VladSem/1b43fe6655f2b363275daf7b1e84626b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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