Check out Google on Github
The best place for studying the code and being inspired is Google’s own repository on Github. There are many fascinating applications here that you can import and start learning from.
Since Github is supported by default in AndroidStudio, getting the code is simple. Just use the built-in import sample feature, which opens from File>New>Import Sample. When you open the dialog you’re greeted with a list of applications, which are sorted into categories. The categories cover new releases, hardware support and special functions.
You can also clone the project locally using git, but if you do then AndroidStudio will have a bit of a struggle assisting you in getting the system updated to match the demands of each sample you try. You may, for example, miss the API level required for the specific feature that the sample demonstrates. When this happens, Android Studio can usually figure it out on its own when using the samples , but this isn’t so easy if you clone it yourself.
Because the available projects cover a range of diverse topics, we recommend that you keep this collection in mind for each project that you create. You can use them to add features such as authentication, hardware sensors and picture-in-picture. Always take a look before you start implementing any new features. It might save you a good chunk of time and effort!