Before we get to the code, let's add the sound files to the project. You can find all the files in the assets
folder inside the Chapter 28
folder. Copy the entire assets
folder and then, using your operating system's file browser, go to the Snake/app/src/main
folder of the project and paste the folder, along with all the files. The sound effects are now ready for use.
Android Programming for Beginners - Second Edition
By :
Android Programming for Beginners - Second Edition
By:
Overview of this book
Are you trying to start a career in programming, but haven't found the right way in? Do you have a great idea for an app, but don't know how to make it a reality? Or maybe you're just frustrated that in order to learn Android, you must know Java. If so, then this book is for you.
This new and expanded second edition of Android Programming for Beginners will be your companion to create Android Pie applications from scratch. We will introduce you to all the fundamental concepts of programming in an Android context, from the basics of Java to working with the Android API. All examples use the up-to-date API classes, and are created from within Android Studio, the official Android development environment that helps supercharge your application development process.
After this crash course, we'll dive deeper into Android programming and you'll learn how to create applications with a professional-standard UI through fragments and store your user's data with SQLite. In addition, you'll see how to make your apps multilingual, draw to the screen with a finger, and work with graphics, sound, and animations too.
By the end of this book, you'll be ready to start building your own custom applications in Android and Java.
Table of Contents (35 chapters)
Android Programming for Beginners - Second Edition
Contributors
Preface
Other Books You May Enjoy
Free Chapter
Beginning Android and Java
First Contact – Java, XML, and the UI Designer
Exploring Android Studio and the Project Structure
Getting Started with Layouts and Material Design
Beautiful Layouts with CardView and ScrollView
The Android Lifecycle
Java Variables, Operators, and Expressions
Java Decisions and Loops
Java Methods
Object-Oriented programming
More Object-Oriented Programming
The Stack, the Heap, and the Garbage Collector
Anonymous Classes – Bringing Android Widgets to Life
Android Dialog Windows
Arrays, ArrayList, Map and Random Numbers
Adapters and Recyclers
Data Persistence and Sharing
Localization
Animations and Interpolations
Drawing Graphics
Threads, and Starting the Live Drawing App
Particle Systems and Handling Screen Touches
Supporting Different Versions of Android, Sound Effects, and the Spinner Widget
Design Patterns, Multiple Layouts, and Fragments
Advanced UI with Paging and Swiping
Advanced UI with Navigation Drawer and Fragment
Android Databases
Coding a Snake Game Using Everything We Have Learned So Far
Enumerations and Finishing the Snake Game
A Quick Chat Before You Go
Index
Customer Reviews