This course is accompanied by exercise files that you can use to follow along with the demonstrations. I've copied the exercise files on my desktop, but you can place them anywhere on your hard disk. The exercise files are organized by chapter. Each chapter contains a folder for each exercise, and each of those folders is put together as an Android studio project. Each project's core files are under the app folder, under src. Under main you'll find folders for Java, and RES for resources, and there's an Android manifest file.
- This course is accompanied by exercise files that you can use to follow along with the demonstrations on screen. I've copied the exercise files to my desktop, but you can place them anywhere on your hard disk. The exercise files are organized by chapter, with one directory for each chapter, and within those directories, sub-directories for each video. Within those directories, you'll find directories that are organized as Android Studio projects. You can recognize these by the inclusion of IML files, and gradle directories and files.
To open any of these, you'll need Android Studio 2.1 or later. From the welcome screen, select Open an Existing Project. Then navigate to your desktop if that's where you placed the exercise files. If you're working from your desktop, you can use the keyboard shortcut, command+d on Mac or control+D on Windows to get to the desktop very quickly. Then, drill down through the exercise files to the directory for that video, choose the directory that has the Android Studio icon and then click OK to open it.
These applications, again, were built with Android Studio 2.1. If you're working with a more recent version of Android Studio, you might be prompted to upgrade the gradle wrapper for the project. You can typically do this safely, and the project should still work fine. But there are some required components that you'll need to make sure you have installed if you don't want to start changing configurations. To find out about these, go to the menu and choose Tools, Android, SDK Manager.
Here are the components that I have installed. I'm doing all of my development and testing in this course with Android 6 Marshmallow. That's API level 23. You'll need to make sure you've installed that API level, and if you're going to use emulators for testing, make sure you've installed at least one of the Intel emulators. I'm doing most of my testing in this course on physical devices, a phone and a tablet, but if you don't have a lot of those devices, the emulators are pretty important for testing your application on a wide variety of screen sizes and pixel densities.
In addition to the core API, you'll need a particular version of the build tools. Go to the SDK Tools tab and then click Show Package Details. I've built all of these applications with Build Tools 23.0.3. I recommend installing those build tools, even if you have a more recent version also installed. You can keep multiple versions of the build tools installed side by side.
For the SDK tools, I'm using 25.1.6 and either that or a later version will work fine. I also have the Android Support Repository, version 32. As always, if you're using the emulator, you'll need to make sure that you've installed the emulator accelerator, and then that you've gone through the process of installing that software on your development computer. For more details about that, watch the course Android App Development Essential Training.
Once you have everything installed, you should then be able to open the application's code, make any changes you like, and then you should be able to test the application on either virtual or physical devices.
- Configuring Android Studio
- Understanding fragments
- Creating a fragment class and layout
- Adding and removing fragments with Java
- Creating layouts for multiple screens
- Understanding arguments and callback methods
- Passing arguments to a fragment
- Choosing layout at runtime
- Displaying dialogs with fragments
- Using fragments for managing dialogs, shared preferences, and more