Kotlin Android Sample Projects

In this tutorial series we will be developing Android app in kotlin language from scratch .Every previous tutorial will be updated to new code base on running .

DISCLAIMER

This kotlin android sample projects with source code in android studio course consists of different android projects build from scratch on the top of each other using kotlin language .You can find the list of projects on side bar in increasing order .

I hope to collaborate with you

Santosh Dahal

(adsbygoogle = window.adsbygoogle || []).push({});

What is kotlin language ?

Wikipedia

Kotlin is a cross-platform, statically typed, general-purpose programming language with type inference. Kotlin is designed to interoperate fully with Java, and the JVM version of its standard library depends on the Java Class Library, but type inference allows its syntax to be more concise.

What are benefits of kotlin language ?

In accordance with Stack Overflow Developer Survey 2018, Kotlin is the 2nd most loved programming language and the 4th most wanted in the world.

  1. Kotlin allows writing less code
  2. It solves developer challenges
  3. Adopting Kotlin is easy
  4. Kotlin is fully compatible with Java
  5. It imposes no runtime overhead
  6. Kotlin has a strong community
  7. Kotlin suits for the multi-platform development
  8. Kotlin development offers more safety

For More Detail : Benefits of Kotlin .

Getting started

1. Download Code

Download or clone the GitHub repository Download .

If you downloaded the zipped version, unzip the directory somewhere you can access it.The repository consists folder for each sample projects for each tutorial in series.

2. Open in Android Studio

Open the projects sample in the android studio and run it .

(adsbygoogle = window.adsbygoogle || []).push({});

Basic Terms

Android Studio

Android Studio is the official integrated development environment for Google's Android operating system, built on JetBrains' IntelliJ IDEA software and designed specifically for Android development. It is available for download on Windows, macOS and Linux based operating systems.

XML

XML stands for eXtensible Markup Language. XML is a markup language much like HTML. XML was designed to store and transport data.Andriod UI elements are declare using XML.

API

In computer programming, an application programming interface is a set of subroutine definitions, communication protocols, and tools for building software.We communicate with web app through api

ListView

Android ListView is a view which groups several items and display them in vertical scrollable list. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database.

RecyclerView

RecyclerView is flexible and efficient version of ListView. It is an container for rendering larger data set of views that can be recycled and scrolled very efficiently. RecyclerView is like traditional ListView widget, but with more flexibility to customizes and optimized to work with larger datasets.

ListView Vs RecyclerView

Whereas in RecyclerView you can easily implement horizontal and vertical scrolling. ListView supports only simple linear list view with vertical scrolling. Whereas RecyclerView supports three types of lists using RecyclerView.LayoutManager.

  • StaggeredGridLayoutManager
  • GridLayoutManager
  • LinearLayoutManager.

.apk file

Android application package file. Each Android application is compiled and packaged in a single file that includes all of the application's code (.dex files), resources, assets, and manifest file. The application package file can have any name but must use the .apk extension. For example: myExampleAppname.apk. For convenience, an application package file is often referred to as an ".apk".

(adsbygoogle = window.adsbygoogle || []).push({});

Activity

A single screen in an application, with supporting Java code, derived from the Activity class. Most commonly, an activity is visibly represented by a full screen window that can receive and handle UI events and perform complex tasks, because of the Window it uses to render its window. Though an Activity is typically full screen, it can also be floating or transparent.

adb

Android Debug Bridge, a command-line debugging application included with the SDK.

Content Provider

A data-abstraction layer that you can use to safely expose your application's data to other applications. A content provider is built on the ContentProvider class, which handles content query strings of a specific format to return data in a specific format.

Drawable

A compiled visual resource that can be used as a background, title, or other part of the screen. A drawable is typically loaded into another UI element, for example as a background image.

Intent

An message object that you can use to launch or communicate with other applications/activities asynchronously. An Intent object is an instance of Intent.

Manifest File

An XML file that each application must define, to describe the application's package name, version, components (activities, intent filters, services), imported libraries, and describes the various activities, and so on.