Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.spk.muni_darshan;
- import android.app.Activity;
- import android.graphics.Typeface;
- import android.os.Bundle;
- import android.view.Menu;
- import android.view.MenuItem;
- import android.widget.TextView;
- public class MainActivity extends Activity
- {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- TextView tv = (TextView) findViewById(R.id.titleText);
- Typeface font = Typeface.createFromAsset(getAssets(),
- "font/DevLys 180.ttf");
- tv.setTypeface(font);
- }
- <?xml version="1.0" encoding="utf-8"?>
- <resources>
- <string name="app_name">Muni_Darshan</string>
- <string name="font">font</string>
- <string name="title">ddddd</string>
- </resources>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/title"
- android:id="@+id/titleText"
- android:textSize="@dimen/abc_action_bar_default_height_material"
- android:fontFamily="@string/font" />
- android:fontFamily="@string/font"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement