To Examples

ReadFromFile Example

Goal

Directions

  1. Create an Android project named ReadFromFile. Leave the out-of-the-box Hello, World constraint activity that Android Studio generates as is. Here is the XML file for reference:
    activity_main.xml.
  2. Use this Java Activity file:
    MainActivity.java
  3. Create a folder in the app/src/main/res named raw.
  4. Create a file named mnemonic.txt in the raw folder from Item 3 with these contents:
    How I want a drink,
    alcoholic of course,
    after the heavy lectures
    involving quantum mechanics.
    
    Can you guess for what this is a mnemonic?