Unit -04 Working with Text



Lesson Plan: Unit - 04
Subject: P15A2AAD - Android Application Development
Topic of Study: Working with Text
Grade/Level: Master of Computer Applications
Objective: To understand and demonstrate the text and its properties
Time Allotment: 55 Minutes


  • Working with Text
    • Android provides several default font typefaces and styles.
    • Applications can also use custom fonts by including font files as application assets and loading them using the AssetManager, much as one would use resources.
    • By default, Android uses the Sans Serif typeface.
    • The following code excerpt draws some antialiased text in the default typeface (Sans Serif) to a Canvas.
    • Demo of Using Default Fonts:

    • Demo of Typefaces:
  • Using Custom Typefaces:
    • You can easily use custom typefaces with your application by including the font file as an application asset and loading it on demand.
    • For example, you might want to use a handy chess font to implement a simple, scalable chess game.
    • Copy the chess1.ttf file from your hard drive to the project directory /assets/fonts/chess1.ttf.
    • Download Chess font URL-1 or URL-2
    • Exa.
      • Step 01: Create Assests Folder.
      • Step 02: Copy Chess.ttf font to Assets folder.
      • Step 03: write a java code.

Thanks a lot for query or your valuable suggestions related to the topic.

Previous Post Next Post

Contact Form