Although samples can be accessed from within the IDE from the sample browser, it is more usual to open one of these samples at the beginning of a project. This can be done from the welcome screen under Import an Android code sample. There are hundreds of these samples (and many more can be found online), and these are nicely grouped into categories in the sample browser.
Like templates, samples can be used as a starting point for a bigger project, but they are also an education in, and of, themselves, as they are written by extremely knowledgeable developers and are wonderful examples of best practices:
As can be seen from the preceding sample browser, samples can not only be downloaded from the browser but can also be viewed in GitHub. As the reader will know, GitHub is a fantastic code repository of immense use to developers of all kinds,...