Book description
Learn all the Java and Android skills you need to start making powerful mobile applications with practical and actionable steps
Key Features
- Kick-start your Android programming career, or just have fun publishing apps to the Google Play marketplace
- A first-principles introduction to Java, via Android, which means you'll be able to start building your own applications from scratch
- Learn by example and build four real-world apps and dozens of mini-apps throughout the book
Book Description
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.
What you will learn
- Master the fundamentals of coding Java for Android Pie
- Install and set up your Android development environment
- Build functional user interfaces with the Android Studio visual designer
- Add user interaction, data captures, sound, and animation to your apps
- Manage your apps' data using the built-in Android SQLite database
- Find out about the design patterns used by professionals to make top-grade applications
- Build, deploy, and publish real Android applications to the Google Play marketplace
Who this book is for
This book is for you if you are completely new to Java, Android, or programming and want to make Android applications. This book also acts as a refresher for those who already have experience of using Java on Android to advance their knowledge and make fast progress through the early projects.
Table of contents
-
Android Programming for Beginners - Second Edition
- Table of Contents
- Android Programming for Beginners - Second Edition
- Contributors
- Preface
- 1. Beginning Android and Java
-
2. First Contact – Java, XML, and the UI Designer
- Examining the log output
- A note for early adopters of this book
- Exploring the project's Java code and the main layout's XML code
- Adding buttons to the main layout file
- Leaving comments in our Java code
- Coding messages to the user and the developer
- Writing our first Java code
- Frequently asked questions
- Summary
- 3. Exploring Android Studio and the Project Structure
-
4. Getting Started with Layouts and Material Design
- Material design
- Exploring Android UI design
- Layouts
- Creating the Exploring Layouts project
- Building a menu with LinearLayout
- Wiring up the UI with the Java code (part 1)
- Adding layouts within layouts
- Making the layout look pretty
- Wiring up the UI with the Java code (part 2)
- Building a precise UI with ConstraintLayout
- Laying out data with TableLayout
- Summary
- 5. Beautiful Layouts with CardView and ScrollView
- 6. The Android Lifecycle
- 7. Java Variables, Operators, and Expressions
- 8. Java Decisions and Loops
- 9. Java Methods
- 10. Object-Oriented programming
-
11. More Object-Oriented Programming
- Remember that encapsulation thing?
- Encapsulation and static methods mini-app
- OOP and inheritance
- Inheritance example app
- Polymorphism
- Frequently asked questions
- Summary
- 12. The Stack, the Heap, and the Garbage Collector
-
13. Anonymous Classes – Bringing Android Widgets to Life
- Declaring and initializing the objects
- Creating UI widgets from pure Java without XML
- Exploring the palette – part 1
- Anonymous classes
- Exploring the palette – Part 2, and more anonymous classes
- Widget exploration app
- Converting layouts to ConstraintLayout
- Summary
-
14. Android Dialog Windows
- Dialog windows
- The Note to self app
- Summary
-
15. Arrays, ArrayList, Map and Random Numbers
- A random diversion
- Handling large amounts of data with arrays
- Simple array example mini-app
- Getting dynamic with arrays
- Entering the nth dimension with Arrays
- ArrayLists
- Arrays and ArrayLists are polymorphic
- More Java Collections – Meet Java Hashmap
- The Note to Self app
- Frequently asked questions
- Summary
-
16. Adapters and Recyclers
- RecyclerView and RecyclerAdapter
- Adding RecyclerView, RecyclerAdapter, and ArrayList to the Note to Self project
- Running the app
- Frequently asked questions
- Summary
- 17. Data Persistence and Sharing
- 18. Localization
- 19. Animations and Interpolations
- 20. Drawing Graphics
- 21. Threads, and Starting the Live Drawing App
- 22. Particle Systems and Handling Screen Touches
- 23. Supporting Different Versions of Android, Sound Effects, and the Spinner Widget
- 24. Design Patterns, Multiple Layouts, and Fragments
- 25. Advanced UI with Paging and Swiping
- 26. Advanced UI with Navigation Drawer and Fragment
- 27. Android Databases
- 28. Coding a Snake Game Using Everything We Have Learned So Far
- 29. Enumerations and Finishing the Snake Game
- 30. A Quick Chat Before You Go
- Other Books You May Enjoy
- Index
Product information
- Title: Android Programming for Beginners - Second Edition
- Author(s):
- Release date: October 2018
- Publisher(s): Packt Publishing
- ISBN: 9781789538502
You might also like
book
Android Programming for Beginners - Third Edition
Learn the Java and Android skills you need to start developing powerful mobile applications with the …
book
Android Programming with Kotlin for Beginners
Build smart looking Kotlin apps with UI and functionality for the Android platform Key Features Start …
book
Android System Programming
Build, customize, and debug your own Android system About This Book Master Android system-level programming by …
book
Learning Java by Building Android Games - Third Edition
Get ready to learn Java the fun way by developing games for the Android platform with …