Android Programming: The Big Nerd Ranch Guide, 2nd Edition
by Bill Phillips, Chris Stewart, Brian Hardy, Kristin Marsicano
Creating BeatBox
Time to get started. The first step is to create your BeatBox app.
In Android Studio, select File → New Project... to create a new project.
Call it BeatBox, and give it a company domain of android.bignerdranch.com.
Use API 16 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 plays 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access