Creating BeatBox

Time to get started. The first step is to create your BeatBox app. In Android Studio, select FileNew Project... to create a new project. Call it BeatBox and give it a company domain of android.bignerdranch.com. Use API 19 for your minimum SDK and start with one Empty Activity called BeatBoxActivity. Leave the defaults as they are.

You will be using RecyclerView again, so open your project preferences and add the com.android.support:recyclerview-v7 dependency.

Now, let’s build out the basics of the app. The main screen will show a grid of buttons, each of which will play a sound. So, you will need two layout files: one for the grid and one for the buttons.

Create your layout file for the RecyclerView first. You ...

Get Android Programming: The Big Nerd Ranch Guide, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.