Press enter to see results or esc to cancel.

Kotlin Android Tutorial: beginners Guide with Examples

Kotlin Android Tutorial: beginners Guide with Examples

Share this

Kotlin Android Tutorial: Introduction

In this tutorial (Kotlin Android Tutorial: beginners Guide with Examples), I’m gonna teach you how to design and implement modern and functional apps using kotlin programming language. We are going to use Android Studio IDE which is the official IDE for Android App Development.

Android is the most widespread mobile operating system currently on the market. Learning Android App Development is, therefore, the key to accessing one of the most active markets in mobile development.

Kotlin Android Tutorial: Audience

This Tutorial is for Beginners who want to learn Android App development using Kotlin Programming Language. Each tutorial contains a mini-projects (Examples) and exercises to help you understand any concept properly.

You are only required to have prior knowledge of kotlin language. If you are new to kotlin language I would advise you to go through this Kotlin Tutorial Lessons for beginners.

This guide starts from the basics and deals with all the main topics to learn how to program with the Kotlin language.

Table of Contents

First Step to Android app Development

Introduction to Android: History, Features, Versions in kotlin.

In this tutorial: Introduction to Android, I’m gonna guild you through the History of Android as an OS, Evolution of Android versions, Features/characteristics of Android Android Architecture levels, and Success Factors of Android.


Android Components – Activity, Service, Content Providers.

In this kotlin Android tutorial, you will learn all the four components of Android which are, Service, Broadcast Receiver, Activity, and Content provider. These are the building blocks of an Android App.


Android Activity life cycle – Android App Development

In this tutorial, You will learn about  Android Activity life cycle which is a series of states through which the existence of the Activity passes.


Android Studio: How to install, Features, Introduction

In this tutorial, I will introduce you to Android Studio which is the official IDE, and also outline some of the cool features available for us to build a better functioning app. I will also go further to show you how to download and install it to your System properly.


Steps to Create the First Project in Android Studio with Kotlin

In this lesson, you will learn how to configure and start your first android App project with kotlin Language.


Kotlin Android Tutorial: Basic Views And Widgets example

Capture the click of a button in Kotlin

In this tutorial, We will see how to use kotlin to properly capture a button click event with an example. We are going to develop a simple Android app to demonstrate this.


RadioGroup and RadioButton Controls with example

The goal of this concept is to practice implementing an App that requires RadioButton type controls to select an activity. We will learn how to group a set of RadioButton and verify which one is selected using kotlin language.


kotlin Android Tutorial: How to implement CheckBox Control and example

The objective of this concept is to continue practicing projects with Android Studio and incorporate the visual control CheckBox. We are developing a simple app to explain this.


Control Spinner with examples

This tutorial will guide you on how to implement a Spinner widget in our android app. The Spinner control displays a String list and allows us to select one of them.


ListView Control (with a list of String) with examples

In this tutorial, we will learn how to use listview Container. With a practical example, we are going to develop an App with a ListView with names of countries in South America.


kotlin Android Tutorial: ImageButton

We have seen the creation of objects of the Button class using kotlin language, now we will see another class very similar called ImageButton. It has the same philosophy of handling with the difference that can show an image on its surface.


Simple Notifications using the Toast class and example

This tutorial will teach you how to display a temporary pop-up window message. We are going to develop an app to illustrate the use of Toast Class to archive this in kotlin.


Android EditText and example

In this kotlin tutorial, we are going to look at the class that manages keyboard input, EditText. we will develop an app that allows you to enter the username and its key in two EditText.


kotlin Android Tutorial: Launch a second “Activity” – example

This tutorial will teach you how to launch a second activity using Intent. We see the steps we must take to create another Activity and how to launch it from the main Activity using kotlin language.


kotlin Android Tutorial: Launch a second “Activity” with Values (parameters)

In this tutorial, you will learn how to launch another activity with value. we are going to develop an App that accepts website URL and then opens a second Activity to shows that webpage.


kotlin Android Tutorial: Saving and Retrieving Data

Store Data with the SharedPreferences Class in kotlin language

In this tutorial, we see how to use SharedPreference class to store a limited amount of data in our App. We are building an App that will save user email using SharedPreference.


Storing data in a text file in the internal memory

Another possibility of storing data on our Android device is the use of a text file that will be stored in the internal memory of our device. This tutorial will explain how to achieve that with an example using kotlin.


kotlin Android Tutorial: Store(Save) data in a text file on an SD card

In the previous concept, we saw how to create and read a text file in the internal memory of the Android Device. In this tutorial, we will learn how to save and retrieve data from the SD card of our Device.


Store (save) data in SQLite database

In this tutorial, we’ll see another native Android tool for storing data in a database called SQLite. With an example, we will demonstrate the use of SQLite to store and retrieve data using kotlin language.


Installing Android App on a real device

Usually, when developing applications on Android, We usually do all the programming, debugging and testing on a virtual device on the PC.
Now let’s see the steps to test the app on a real Android device.


 

kotlin Android Tutorial: Android Studio Layouts

Layout (LinearLayout) in Kotlin: Example

Android organizes the visual components (Button, EditText, TextView, etc.) on the screen using containers called Layout. So far we have not worried about how to organize a screen, but we have focused on the functionality of each program we implement.


Layout (TableLayout) in Kotlin: Example

The Layout of type TableLayout groups components into rows and columns. TableLayout contains a set of TableRow-like components that group visual components for each row (each row can have a different amount of visual components).


kotlin Android Tutorial: Layout (FrameLayout) Example in Kotlin

The FrameLayout type control has all the visual controls aligned to the upper left vertex, centered, right lower vertex, and so on inside the container. (it has nine possible positions). If we have two or more controls, they are stacked.


Layout (ScrollView and LinearLayout) in Kotlin

The ScrollView along with a LinearLayout allows us to have a number of visual components that exceed the amount of space of the viewer of the phone or tablet. Then the user can move the created interface with his finger. let’s see how to achieve this using kotlin language.


kotlin Android Tutorial: Application icon

When we create a project to implement an application with the Android Studio development environment, it creates two default icons:


kotlin Android Tutorial: Audio Playback

Audio playback (file in raw folder) in Kotlin

We will see the steps to play an mp3 file (other formats supported by Android are: Ogg, Wav) from the raw folder using kotlin language.


Play, Pause, Resume, and Stop an Audio file in kotlin

In this kotlin android tutorial, you will learn how to create an application that allows you to start, pause, stop, continue an mp3 file inside our asset raw folder.


kotlin Android Tutorial: Audio playback (file from SD card)

The purpose of this concept is to access an mp3 file stored on the SD card of our device. each step is explained with proper image and source code.


 Audio playback (file from internet) in Kotlin

In this tutorial, we will develop an android app that will allow us to play an audio file from the internet.


kotlin Android Tutorial: Playing audio using your own Android player (via Intent)

This tutorial will teach you how to develop an app that will play audio using and Android Player with kotlin language. Another way to run an mp3 file is through the built-in Android player.


 Record audio using Android recorder (via Intent) in Kotlin

In this kotlin tutorial, we will develop an App that will record an audio and also play it from the saved folder.


kotlin Android Tutorial: Record audio using the MediaRecorder class

Another way to record audio on Android is to use the MediaRecorder class. This tutorial will guide you on how to record audio with an example using kotlin language.


kotlin Android Tutorial: Draw with Canvas Class

Draw graphing pixels

In this tutorial, you will learn how to draw graphing pixels. Graph 10000 pixels in a random white color on the device screen with a black background.


kotlin Android Tutorial: Draw background and draw lines

With a practical example, you will learn how to draw lines and paint background color using kotlin Canvas class. Paint the yellow background and draw a series of lines with different styles.


Draw rectangles shape

This tutorial will teach you how to use drawRect method in Canvas class to draw a rectangle with different border sizes and color fill using kotlin language.


kotlin Android Tutorial: Draw circles App

This kotlin android tutorial will teach you how to use drawCircle method to draw circles in our android project. Paint the white background and draw 10 circles growing from the middle of the screen.


kotlin Android Tutorial: Draw ovals shape


Draw text using Canvas

Another resource that allows the Canvas class is to plot text. We are going to use drawText method to print a String in a certain column, row with a specific brush that we can define its color.

kotlin Android Tutorial: Draw: text with external font style

This Android kotlin will guide you on how to draw a text using an external font style. For this, we will implement an application that shows a text with an external font.

kotlin Android Tutorial: Draw: text on a path

In this tutorial, we are going to learn how to write a text in a different path other than horizontal. With an example, We will simply achieve this by creating a path indicating the points where the text will pass.

kotlin Android Tutorial: Draw: an image in kotlin

In this tutorial, We are going to draw and display an image file using drawBitmap method in Canvas Class. A simple practical problem is proposed, where we gonna Display the contents of a jpg file on the screen knowing it has a size of 250 pixels wide by 200 high.

kotlin Android Tutorial: Touch event: draw a circle in

In this kotlin tutorial, you will develop a program that draws a circle in the 100, 100 coordinates. When another part of the touch screen is pressed, move the circle to that coordinate.
Share this