| Index | Making an Android app - AndroidStudio |
AndroidStudio is SLOW to load. Time to make a cup of coffee or play a game of solitaire...
You get a new project (or app, or even program) by closing any existing project (if there), then either agreeing you do need a new project, or via File, New Project (NOT Module, which is something different).
If you choose Blank Activity, you get all sorts of stuff you don't want, and have to remove.
If you get a screen saying no files are open, then click on 'project' down the left hand side, and stuff should appear. Since you haven't coded anything yet, you may be surprised to discover there is something there. AndroidStudio provides a stub app, which will get you started. (It says "Hello world" which accounts for my acid comments under First Things). So if you want, you can try running this app, just to make sure that you've got the necessary software, and your device will talk to your computer.
First, we must get the right view. To the right of where it says Project (we are still on the left of the screen), there is a drop down menu of view. The top option is Project. An option lower down is Android. I suggest you click on Android to select it. This should show the directory list, with little triangles on the front, which you can click on to show or hide their contents. Here are the paths for useful stuff (for each step of the path, click on another triangle).
app/java/com.(the project name)/MainActivity - this is your main code (in Java) - you have something there already
app/res/drawable - pictures go in here - it's empty at the moment
app/res/layout/activity_main.xml - the layout of your screen which you will need to format - there is a basic layout here already
app/res/mipmap - the icon on your device as representing your app - there is one at every resolution. You can override these, but ignore them for the time being
app/res/values/strings.xml - all strings used by your app go in here - there is one here already
The most important things you will need are the MainActivity (for the code), the activity_main.xml (for the screen layout and input and output) and the strings.xml. Double click on any of these to show their contents. Once you've done that, there are tabs across the top of the display area, so you can flip from one to another as you want.
© Jo Edkins 2016 - Index to Android app index