

The other 2 methods: onCreateOptionsMenu(Menu) and onOptionsItemSelected(MenuItem) are used to create the Menu for this Activity, but we won’t use it in this Application, so you can delete them.

There should be some auto-generated code, but you can leave only the onCreate(Bundle) method. You can close activity_shopping_list.xml and strings.xml. The ShoppingListApp will be installed on your device and should look like this: All the available devices should appear in the Choose Device window, under ‘Devices’. You can either plug in your Android device, or you can create a new Genymotion device and start it. You can run the app to make sure everything works. In this file you will keep all the String values that the user can see. Go to app -> res -> values and open strings.xml. On the left hand side, you will see a list of all the files and directories in your project. Replace the code that’s been generated for you with this: Īndroid Studio will give you two errors because the String values for the Button and EditText haven’t yet been created. Open activity_shopping_list.xml and switch to the Text tab. While you wait, you can read some Tips of the Day. Set the Activity Name to ‘ShoppingListActivity’ and leave everything else as it is.Ĭlick Finish and wait for Android Studio to build your project. You can now see that there are multiple templates you can choose from for your Activity.


Fortunately, you can easily change it whenever you want.Īfter you made up your mind, click Next. And then grant permission to access the messages and calls on the device. For this application, the users would need to register themselves with the app. For the backend, we will use SQLite for our project. Java and XML will support the front-end of the application. I used API 15, because at this time it targets approximately 90.4% of the devices. This application will use Android Studio with Java and XML. If you are not sure what API level to choose, you can click on “Help me choose.” and see for each version how many users will be able to use your app. Keep in mind that you cannot run your app on devices that have lower API than the one you choose, but if you choose an API that is too old, you will probably not be able to use all the features you want. Now you need to select the Minimum SDK for your app. Pick a location for your project and click Next. Notice that the Package name will be your domain name backwards. If you don’t own a domain, you can set it to ‘’ or create a new one. Set the Application name to be ‘MyShoppingList’ and the Company Domain to be your website. Open Android Studio and click on ‘Start a new Android Studio Project’ In this tutorial you will build you own shopping list app! You will be able to write items and add them to your shopping list. In the end it will look like this:
