The exercise files for this course are available in a public GitHub repository. In this video, check out the repository and review the course's starting app.
- [Instructor] To demonstrate how to use various aspects of Android architecture, I'm going to build this simple app called Roll the Dice that lets you generate and present a randomized set of five dice. The starting out for the course already has the essentials of the user interface and you can download it from this GitHub repository. From this screen, click the clone or download button and then click this button to copy this URL to the clipboard. In order to check out the repository, you'll need to have installed Git on your computer.
If you don't have Git already, you can download it from here and just follow this website's simple instructions for installation. Then, on the Android Studio welcome screen, you can check out the project from version control. Choose Git. Paste in the URL. Decide where you want to place the project. I'm using the default of Android Studio projects under my home directory and click clone. If everything goes well, you'll see this dialog and you can check out the project from version control and that will open the project immediately.
The exercise files for this project were created with Android Studio 3.4 release candidate one. By the time you watch the course, you'll be using a more recent version and so each time you open the exercise files, you might see this dialog asking you to upgrade your greater plug-in to match your version of Android Studio. You should always click update and then wait until the project is rebuilt. The master branch of the project contains the finished version of the application.
You can peek at it or if you want to start from scratch, go to your list of branches. You can find it down here in the lower right corner or you can go to the menu and choose VCS, GIT, branches. Click on the show length to show all of your branches and then scroll all the way down to the bottom and look for a branch called starting out. Select it and check it out as starting out and now you'll have your own local copy of that branch.
For this checkout, click the forced checkout button and you'll see a bunch of files disappear and you'll be left with a single activity class called main activity. The main activity class uses a layout file called activity main and it has a nesting layout file called content main. And that's where this display of five dice images and a headline with a text roll 'em are defined. Now for each video, you'll want to check out the branch for that video.
So for example, for video number two in chapter one, you will check out the branch 0102 and check it out as a local branch of the same name and if you want to look at the finished version for that video, you can look for the same branch number but with the letter E up-handed for end. After making any local changes to these branches, you should check them in locally and you can do that by going to the version control tab. If you've made any changes, you'll see the files listed here and you can click this button to commit them locally.
After you commit them locally, you should then be able to check out the next branch. So that's how to get started with the exercise files and how to use the GitHub repository from within Android Studio.
Looking for study partners?Join the Associate Android Developer Exam study group
The Android app architecture constantly evolves. The introduction of the Kotlin programming language, new form factors such as Chromebooks, and reusable architecture components have made it faster and easier than ever to build high-quality Android apps. It is imperative that developers understand what the latest tools and recommendations are and how to use them to build out their applications. In this course, instructor David Gassner explains how to build an Android app that uses Kotlin instead of Java, add navigation functionality, and leverage the most useful architecture components such as LifecycleObserver, ViewModel, and LiveData, to create apps that are robust and easy to maintain over time.
- Handling lifecycle events
- Handling view events
- Updating display from new data
- Adding ViewModels to activities
- Subscribing to changes in LiveData values
- Adding a new launcher activity
- Starting activities with explicit intents
- Sharing data with implicit intents
- Adding a navigation drawer
- Adding a header to a navigation drawer
- Handling navigating drawer menu events