Advertisement
Guest User

Untitled

a guest
May 30th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. package com.example.spk.muni_darshan;
  2.  
  3. import android.app.Activity;
  4. import android.graphics.Typeface;
  5.  
  6. import android.os.Bundle;
  7. import android.view.Menu;
  8. import android.view.MenuItem;
  9. import android.widget.TextView;
  10.  
  11.  
  12. public class MainActivity extends Activity
  13. {
  14. @Override
  15. protected void onCreate(Bundle savedInstanceState) {
  16. super.onCreate(savedInstanceState);
  17. setContentView(R.layout.activity_main);
  18.  
  19. TextView tv = (TextView) findViewById(R.id.titleText);
  20. Typeface font = Typeface.createFromAsset(getAssets(),
  21. "font/DevLys 180.ttf");
  22. tv.setTypeface(font);
  23.  
  24. }
  25.  
  26. <?xml version="1.0" encoding="utf-8"?>
  27.  
  28. <resources>
  29. <string name="app_name">Muni_Darshan</string>
  30. <string name="font">font</string>
  31. <string name="title">ddddd</string>
  32. </resources>
  33.  
  34. <TextView
  35. android:layout_width="wrap_content"
  36. android:layout_height="wrap_content"
  37. android:text="@string/title"
  38. android:id="@+id/titleText"
  39. android:textSize="@dimen/abc_action_bar_default_height_material"
  40. android:fontFamily="@string/font" />
  41.  
  42. android:fontFamily="@string/font"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement