To Lecture Notes

IT 372 -- Jun 2, 2025

Two App Enhancements

  1. Change the Icon of App.
    1. Find or create a new icon for your app. For example, for the Magic8Ball Example, you might use this icon: Eightball. Name the icon eightball.png and save it on your harddrive.
    2. Select and copy the icon (for example eightball.png) using Control-C with Windows or Command-C with Mac.
    3. Select the mipmap folder located at
      app >> res >> mipmap
      then paste the icon into the folder with Control-V with Windows or Command-V with Mac. You will see eightball.png appear in the mipmap folder.
    4. Open the manifest of the app
          app >> manifests >> AndroidManifest.xml
    5. Change these two lines in the <application> element from
      android:icon="@mipmap/ic_launcher"
      
      to
      android:icon="@mipmap/eightball"
      
      and
      android:roundIcon="@mipmap/ic_launcher_round"
      
      to
      android:roundIcon="@mipmap/eightball"
      
    6. Run the app on the emulator. See that the new icon appears when the app is loading.
    7. Close the app with the back arrow and swipe up to see all the apps installed on the emulator. See that the new icon is used to represent the app.
  2. Modify the App Theme. A theme file is roughly similar to a CSS stylesheet.
    1. Create an app with three TextView widgets having text values "TextView 1", "TextView 2", and "TextView 3".
    2. Open the light theme file at
          app >> res >> values >> themes >> themes.xml
      Do not open the themes.xml (night) file.
    3. Below the comment
      <!-- Customize your light theme here. -->
      
      place these style elements:
      <item name="android:textColor">@color/red</item>
      <item name="android:textSize">40sp</item>
      <item name="android:textAllCaps">false</item>
      
    4. Run the app. Verify that the three TextView widgets are styled according to the three new styles in the theme file.
  3. Look at this WriteToFile Example.

Intro to Jetpack Compose