From ad97d2f80c5654a4e34b6a38d15b3b625fe7ecd0 Mon Sep 17 00:00:00 2001
From: pelibby16 <pelibby16@earlham.edu>
Date: Thu, 14 Nov 2024 15:09:36 -0500
Subject: [PATCH] add android readme

---
 topical-units/env-android/ANATOMY.md | 38 ++++++++++++++++++++++++++++
 topical-units/env-android/README.md  |  3 ++-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 topical-units/env-android/ANATOMY.md

diff --git a/topical-units/env-android/ANATOMY.md b/topical-units/env-android/ANATOMY.md
new file mode 100644
index 0000000..f2ce465
--- /dev/null
+++ b/topical-units/env-android/ANATOMY.md
@@ -0,0 +1,38 @@
+# Android Anatomy
+Android can be a daunting IDE to work with. Use the example below as a reference for what different files do, and how you can use them. 
+
+Keep in mind that for the deliverables specified on the main README.md of this module, the most important parts are the `MainActivity` Java file, and the `res/layout` folder, containing your XML layouts for the GUI of the app. Even if you are hoping to accomplish something more complex, the best place to start is with these couple of files, and work your way outward from there.
+
+**Note:** for the sake of this example, I've created a project called "CS266" from the "Empty Views Activity" template, using Java as my language (Instead of Kotlin)
+
+If you are still feeling lost, please ask quetsions!
+
+## Breakdown of a Sample Project
+- **manifests/**
+  - **AndroidManifest.xml** - Essential information about your app and how it is built. More info [Here](https://developer.android.com/guide/topics/manifest/manifest-intro).
+- **java/**
+  - **com.example.cs266/**
+    - `MainActivity` - This Java file contains the code being run when the app is launched from the homescreen. It should have an "onCreate" method that will set the view to an XML layout from the **layout/** directory.
+  - **com.example.cs266/ (androidTest)**
+    - `ExampleInstrumentedTest` - This Java file contains unittest code that will be executed on an Android device.
+  - **com.example.cs266/ (test)**
+    - `ExampleUnitTest` - This Java file contains unittest code that will be executed on the host machine running Android Studio.
+- **res/**
+  - **drawable/**
+    - `ic_launcher_background.xml`
+    - `ic_launcher_foreground.xml`
+  - **layout/**
+    - **activity_main.xml** - This XML file contains the layout for the default app. You can have multiple different XML layouts in the **layout/** directory. More info about layouts [Here](https://developer.android.com/develop/ui/views/layout/declaring-layout).
+  - **mipmap/** - Contains all the XML information for app icons/launchers. There are multiple versions for different devices, resolutions and shapes.
+    - **ic_launcher/**
+    - **ic_launcher_round/**
+  - **values/** - This directory contains XML files that are used to configure project-side variables. It is commonly used for naming things, and for storing color information. It also contains the subfolder for themes, which can make use of those colors to create different color scheme combinations.
+    - `colors.xml`
+    - `strings.xml`
+    - **themes/**
+      - `themes.xml` - Note that this is referenced in the AndroidManifest.xml
+      - `themes.xml (night)`
+  - **xml/** - These files contain rules about specific aspects of the app. They are also referenced in AndroidManifest.xml. For most basic apps, there is no need to modify these rules.
+    - `backup_rules.xml`
+    - `data_extraction_rules.xml`
+
diff --git a/topical-units/env-android/README.md b/topical-units/env-android/README.md
index 19e9db2..3f14303 100644
--- a/topical-units/env-android/README.md
+++ b/topical-units/env-android/README.md
@@ -10,7 +10,8 @@ Android development consists of the Java programming language, the MySQL databas
 
 # Resources
 - [Android Studio IDE](https://developer.android.com/studio)
-- [W3Schools - Android](https://www.w3schools.blog/android-tutorial) - lots of information about specific components of android development
+- [W3Schools - Android](https://www.w3schools.blog/android-tutorial) - lots of information about specific components of Android development
+- [Android Anatomy README](ANATOMY.md) - Breakdown of the different files in a sample Android project.
 
 # Deliverables
 You will write a "hello world" Android app and install it on your own device, or on the Android Emulator included with Android Studio.
-- 
GitLab