Author: admin
-
An Overview of Kotlin Functions and Lambdas
Kotlin functions and lambdas are a vital part of writing well-structured and efficient code and provide a way to organize programs while avoiding code repetition. In this chapter, we will look at how functions and lambdas are declared and used within Kotlin. What is a function? A function is a named block of code that…
-
Kotlin Control Flow
Regardless of the programming language used, application development is largely an exercise in applying logic, and much of the art of programming involves writing code that makes decisions based on one or more criteria. Such decisions define which code gets executed, how many times it is executed, and, conversely, which code gets bypassed when the…
-
Kotlin Operators and Expressions
So far, we have looked at using variables and constants in Kotlin and also described the different data types. Being able to create variables is only part of the story, however. The next step is to learn how to use these variables in Kotlin code. The primary method for working with data is in the…
-
Kotlin Data Types, Variables and Nullability
Both this and the following few chapters are intended to introduce the basics of the Kotlin programming language. This chapter will focus on the various data types available for use within Kotlin code. This will also include an explanation of constants, variables, type casting and Kotlin’s handling of null values. As outlined in the previous…
-
An Introduction to Kotlin
Android development is performed primarily using Android Studio which is, in turn, based on the IntelliJ IDEA development environment created by a company named JetBrains. Before the release of Android Studio 3.0, all Android apps were written using Android Studio and the Java programming language (with some occasional C++ code when needed). Since the introduction…
-
An Example Jetpack Compose Project
In the previous chapter, we created a new Compose-based Android Studio project named ComposeDemo and took some time to explore both Android Studio and some of the project code that it generated to get us started. With those basic steps covered, this chapter will use the ComposeDemo project as the basis for a new app.…
-
Overview of a Jetpack Compose Project
Now that we have installed Android Studio, the next step is to create an Android app using Jetpack Compose. Although this project will use several Compose features, it is an intentionally simple example intended to provide an early demonstration of Compose in action and an initial success on which to build as you work through…
-
Jetpack Compose 1.4 Essentials – Introduction
This book teaches you how to build Android applications using Jetpack Compose 1.4, Android Studio Giraffe (2023.2.1), Material Design 3, and the Kotlin programming language. The book begins with the basics by explaining how to set up an Android Studio development environment. The book also includes in-depth chapters introducing the Kotlin programming language, including data…
-
Jetpack Compose 1.4 Essentials
-
Google Changing Android Studio Version Numbering System
Google has announced that it is changing the version numbering system for Android Studio with the change taking effect after the release of Android Studio 4.2. This means that instead of calling it Android Studio 4.3, it will be called Android Studio Arctic Fox (2020.3.1). This new system includes a code name representing a major…