Book Image

Android Programming with Kotlin for Beginners

By : John Horton
5 (1)
Book Image

Android Programming with Kotlin for Beginners

5 (1)
By: John Horton

Overview of this book

Android is the most popular mobile operating system in the world and Kotlin has been declared by Google as a first-class programming language to build Android apps. With the imminent arrival of the most anticipated Android update, Android 10 (Q), this book gets you started building apps compatible with the latest version of Android. It adopts a project-style approach, where we focus on teaching the fundamentals of Android app development and the essentials of Kotlin by building three real-world apps and more than a dozen mini-apps. The book begins by giving you a strong grasp of how Kotlin and Android work together before gradually moving onto exploring the various Android APIs for building stunning apps for Android with ease. You will learn to make your apps more presentable using different layouts. You will dive deep into Kotlin programming concepts such as variables, functions, data structures, Object-Oriented code, and how to connect your Kotlin code to the UI. You will learn to add multilingual text so that your app is accessible to millions of more potential users. You will learn how animation, graphics, and sound effects work and are implemented in your Android app. By the end of the book, you will have sound knowledge about significant Kotlin programming concepts and start building your own fully featured Android apps.
Table of Contents (33 chapters)
Android Programming with Kotlin for Beginners
Contributors
Preface
Index

The Bitmap manipulation demo app


Now that we have studied the theory, let's draw and spin some bitmaps. First, create a new project and call it Bitmap manipulation. Choose the Empty Activity option with all the other settings as they have been throughout the book.

Adding the Bob graphic to the project

Right-click and select Copy to copy the bob.png graphics file from the download bundle in the Chapter20/Bitmap Manipulation/drawable folder. Bob, represented by bob.png, is a simple, static video game character.

In Android Studio, locate the app/res/drawable folder in the project explorer window and paste the bob.png image file into it. The following screenshot makes it clear where this folder is located and what it will look like with the bob.png image in it:

Right-click on the drawable folder and select Paste to add the bob.png file to the project. Click on OK twice to confirm the default options for importing the file into the project.

In this app, we will make the same change that we did in...