Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Android Programming for Beginners
  • Table Of Contents Toc
Android Programming for Beginners

Android Programming for Beginners - Fourth Edition

By : John Horton
close
close
Android Programming for Beginners

Android Programming for Beginners

By: John Horton

Overview of this book

Modern Android development has evolved rapidly, with Kotlin and Jetpack Compose becoming the standard tools for building powerful mobile applications. Android Programming for Beginners provides a practical introduction for readers with little or no coding experience. Rather than overwhelming you with theory, the book teaches concepts gradually through hands-on experimentation and small, focused apps that reinforce core programming fundamentals. You will begin by learning Kotlin essentials including variables, loops, functions, lambdas, collections, and object-oriented programming before moving into Android Studio and Jetpack Compose. As your skills grow, you will create interactive projects ranging from UI layouts and games to multimedia and database-driven applications. Along the way, you will explore Android development techniques such as state management, navigation, Material Design, Room databases, Canvas drawing, and responsive layouts. To help future-proof your workflow, each chapter also includes optional AI-assisted programming exercises that show how modern coding tools can support experimentation, accelerate development, and deepen understanding. By the end of the book, you will have built a portfolio of Android apps and gained the confidence to continue toward advanced mobile development projects independently.
Table of Contents (36 chapters)
close
close
Lock Free Chapter
1
Part 1: Kotlin & Jetpack Compose Basics
11
Part 2: Data Structures, Kotlin Fundamentals & More Advanced UIs
20
Part 3: Object-Oriented Programming & Building More Advanced Apps
29
Part 4: Vibe Coding & Learning with AI
34
Other Books You May Enjoy
35
Index

How does Android Remember

We already know that Jetpack continuously runs our UI code. We also know that when it runs our code, it is not running the exact code we declared, but rather our code after the Compose compiler has rewritten it.

Look at this simple code:

Text("Hello")

It is called, perhaps, when we first start an app, when the screen is rotated, when we return to the app after switching back from another app, after a notification obscures the app, and so on. The point is that it happens all the time. If we declare and initialize regular variables within a composable function (or in the setContent call), they will be reset each time the function is called.

Therefore, this code in the setContent call:

Text("Hello")
var count = 0

It would constantly reset the count variable to zero, no matter what code we wrote to change it. This is a problem because we might want to remember the user's input or the result of a calculation and store it in our variables.

...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Android Programming for Beginners
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon