diff --git a/documentation/docs/Android/androidStudio.md b/documentation/docs/Android/androidStudio.md new file mode 100644 index 0000000..1afe60b --- /dev/null +++ b/documentation/docs/Android/androidStudio.md @@ -0,0 +1,33 @@ +# Learning android studio + +## The order of making a android app + +### 1. Layout +When you've created a project you need to make the layout of the app. This is done in the `res/layout/activity_main.xml` file. This file is a xml file that describes the layout of the app. If the folder doesnt exist you can create it by right clicking on the `res` folder and selecting `New -> Android Resource File`. There you can add qualifiers to the file. Qualifiers are used to specify what kind of properties its has. + +### 2. Variables for the layout +When you're dragging and droppign things in you can add a recource name to the object. This is used to reference the object in the code. You can add a recource name by clicking on the object and then going to the `Attributes` tab. There you can add a recource name. That recource name is then used to reference the object in the code. + +### 3. Code +After you made the layout you can start writing code in the `MainActivity.java` file. This file is located in the `java/com.example.myfirstapp` folder. This file is the main file of the app and is the file that is run when the app is started. + +### 4. Permissions + +If you want to use a certain permission in your app you need to add the permission to the `AndroidManifest.xml` file. This file is located in the `app` folder. You can add a permission like this: + +```xml + +``` +[This](https://gist.githubusercontent.com/Arinerron/1bcaadc7b1cbeae77de0263f4e15156f/raw/6c577d9f425340a7dcd1ec5efc7a12c054d6623f/xml_permissions.txt) is a list of all the permissions you can use. + + + + +## Sources + +* Android studio guides + * https://developer.android.com/codelabs/build-your-first-android-app + * https://www.jetbrains.com/help/idea/create-your-first-android-application.html#yivskh_3 + +* Permission list + * https://gist.githubusercontent.com/Arinerron/1bcaadc7b1cbeae77de0263f4e15156f/raw/6c577d9f425340a7dcd1ec5efc7a12c054d6623f/xml_permissions.txt \ No newline at end of file