- Saved searches
- Use saved searches to filter your results more quickly
- DavidMendozaMartinez/Android-Basics-in-Kotlin
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- A Complete Guide to Learn Kotlin For Android App Development
- Step-by-Step Guide to Learn Kotlin for Android App Development
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Android Basics in Kotlin course.
DavidMendozaMartinez/Android-Basics-in-Kotlin
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Android Basics in Kotlin course.
Android Basics in Kotlin is a course about building basic Android apps. This course is for people with no prior programming experience.
You will learn Kotlin, the recommended programming language for developing Android apps. You will use the Android Studio tool to build these apps, and you will learn the fundamental concepts of Android development along the way.
By the end of this course, you will have created a collection of well-designed, interesting, and fun Android apps. We hope that this will spark your imagination to continue learning Android and building cool apps on your own!
You can find more information here.
If you meet the following prerequisites, then this course is a good place for you to start to learn Android app development.
- You have computer knowledge that includes file structure, and configuring and using applications of moderate complexity, such as a spreadsheet, word processor, or photo editor.
- You can verify system requirements (such as OS version, disk and memory space requirements, and screen resolution).
- You are comfortable downloading, installing, and updating software.
What does the course cover?
This course is divided into units. Each unit covers a major area of Android app development.
Unit 1: Kotlin basics for Android
Build your first Android apps with the Kotlin programming language. Add images and text to your Android apps, and learn how to use classes, objects, and conditionals to create an interactive app for your users.
Improve the user interface of your app by learning about layouts, Material Design guidelines, and best practices for UI development.
Enhance your users’ ability to navigate across, into and back out from the various screens within your app for a consistent and predictable user experience.
Unit 4: Connect to the internet
Write coroutines for complex code, and learn about HTTP and REST to get data from the internet.
A Complete Guide to Learn Kotlin For Android App Development
Kotlin is a statically typed, cross-platform, general-purpose programming language for JVM developed by JetBrains. This is a language with type inference and fully interoperable with Java. Kotlin is concise and expressive programming as it reduces the boilerplate code. Since Google I/O 2019, Android development has been Kotlin-first. Kotlin is seamlessly integrated with the Android Studio and many companies are moving the entire code base from Java to Kotlin. Asynchronous tasks are seamlessly implemented in Kotlin using coroutines. So here’s the complete guide to learn Kotlin, specifically for Android Application Development.
So in this article, we have covered the following things:
- Basics Of Kotlin Programming Language
- Conditional Statements(Control Flow) in Kotlin
- Functional Programming in Kotlin
- Collections in Kotlin Programming Language
- Object-Oriented Programming Concepts of Kotlin
- Kotlin Exception Handling
- Kotlin Null Safety
- Kotlin Scope Functions
- Kotlin Interoperability with Java
- Kotlin Coroutines
- Miscellaneous
- Complete Kotlin Tutorial
Step-by-Step Guide to Learn Kotlin for Android App Development
Basics Of Kotlin Programming Language
- Introduction to Kotlin – Introductory discussion about the Kotlin Programming language. Contains advantages and application of the Kotlin programming language.
- Kotlin Environment setup with Intellij IDEA – Setup IDE and get ready to start the programming journey with Kotlin.
- Hello World program in Kotlin – Get to know the first “Hello World” program in Kotlin. It’s simple.
- Kotlin Data Types – Fundamental data type in Kotlin is a Primitive data type and all others are reference types like array and string.
- Kotlin Variables – The mutable and immutable data types in Kotlin.
Conditional Statements(Control Flow) in Kotlin
- Kotlin if-else expression – Basic if-else control flow statement in Kotlin. Get to know if, if-else, if-else-if ladder, nested-if.
- Kotlin when expression – when it replaces the switch operator of other languages like Java. We do not require a break statement at the end of each case.
- Kotlin while loop – while loop in Kotlin.
- Kotlin do-while loop – do-while loop in Kotlin.
- Kotlin for loop – In Kotlin, for loop is equivalent to foreach loop.
Functional Programming in Kotlin
- Kotlin functions – Basics of functions and their declaration in Kotlin.
- Kotlin | Default and Named argument – Make the parameters of the function optional. i.e pass an argument or not while calling a function.
- Lambdas Expressions and Anonymous Functions – Syntax of Kotlin lambdas is similar to Java Lambdas. A function without a name is called an anonymous function.
- Kotlin Inline functions – Interesting inline keyword which ultimately requests the compiler to not allocate memory and simply copy the inlined code of that function at the calling place.
- Kotlin infix function notation – A function marked with infix keyword can also be called using infix notation, which means calling without using parenthesis and dots.
- Kotlin Higher-Order Functions – Kotlin functions can be stored in variables and data structures, passed as arguments to, and returned from other higher-order functions.
Collections in Kotlin Programming Language
- Kotlin Collections – A collection usually contains a number of objects of the same type and these objects in the collection are called elements or items.
- Kotlin list : Arraylist – Dynamic array states that we can increase or decrease the size of an array as pre-requisites.
- Kotlin list : listOf() – Kotlin has two types of lists, immutable lists (cannot be modified) and mutable lists (can be modified).
- Kotlin Set : setOf() – Kotlin Set interface is a generic unordered collection of elements, and it does not contain duplicate elements.
- Kotlin mutableSetOf() – setOf() is immutable, meaning it supports only read-only functionalities and mutableSetOf() is mutable, meaning it supports both read and write.
- Kotlin hashSetOf() It implements the set interface. hashSetOf() is a function that returns a mutable hashSet, which can be both read and written.
- Kotlin Map : mapOf() – Map holds the data in the form of pairs which consist of a key and a value.
- Kotlin Hashmap – Kotlin Hash Table-based implementation of the MutableMap interface. It stores the data in the form of key and value pairs.
Object-Oriented Programming Concepts of Kotlin
- Kotlin Class and Objects – Class and Objects are the basic concepts of an object-oriented programming language. These support the OOPs concepts of inheritance, abstraction, etc.
- Kotlin Nested class and Inner class – A class is declared within another class, then it is called a nested class.
- Kotlin Setters and Getters – setter is used to set the value of any variable and getter is used to get the value. Getter and Setter are auto-generated in the code.
- Kotlin | Class Properties and Custom Accessors – So, accessor methods – a getter and a setter are provided to let the clients of the given class access the data.
- Kotlin constructor – The primary constructor initializes the class, while the secondary constructor is used to initialize the class and introduce some extra logic.
- Kotlin Visibility Modifiers – Visibility modifiers are used to restrict the accessibility of classes, objects, interfaces, constructors, functions, properties, and their setters to a certain level.
- Kotlin Inheritance – Inheritance enables code re-usability. It allows inheriting the features from an existing class(base class) to a new class(derived class).
- Kotlin Interfaces – Interfaces are custom types provided by Kotlin that cannot be instantiated directly.
- Kotlin Data Classes – We often create classes to hold some data in them. In such classes, some standard functions are often derivable from the data.
- Kotlin Sealed Classes – As the word sealed suggests, sealed classes conform to restricted or bounded class hierarchies.
- Kotlin Abstract class – An abstract class can not instantiate. It means we can not create objects for the abstract class.
- Enum classes in Kotlin – enum has its own specialized type, indicating that something has a number of possible values. Unlike Java enums, Kotlin enums are classes.
- Kotlin extension function – When a function is added to an existing class it is known as an Extension Function.
- Kotlin generics – Allow defining classes, methods, and properties that are accessible using different data types while keeping a check of the compile-time type safety.
Kotlin Exception Handling
- Kotlin Exception Handling | try, catch, throw and finally – An exception is an unwanted or unexpected event that occurs during the execution of a program i.e at run time.
- Kotlin Nested try block and multiple catch block – The requirement of nested try-catch block arises when an exception occurs in the inner try-catch block is not handled by the inner catch blocks.
Kotlin Null Safety
- Kotlin Null Safety – Kotlin’s type system is aimed to eliminate the jeopardy of null reference from the code because it is a billion-dollar mistake.
- Kotlin | Type Checking and Smart Casting – It is a way of checking the type of the variable at runtime.
- Kotlin | Explicit type casting – Kotlin also provides a facility of typecasting using safe cast operator as. If casting is not possible, it returns null instead of throwing a ClassCastException exception.
Kotlin Scope Functions
- Kotlin – Scope Function – We can access the object of these functions without its name.
- Kotlin | apply vs with – Difference between most confusing Scope functions, get to know with examples.
Kotlin Interoperability with Java
- Java Interoperability – Calling Kotlin from Java – When Kotlin was developed, it worked solely on JVM, hence it provides a complete set of features that makes calling Kotlin from Java quite easy.
- Java Interoperability – Calling Java from Kotlin – The getter and setter of all the types defined within the Java class are represented as properties in the Kotlin.
Kotlin Coroutines
- Suspend Function In Kotlin Coroutines – Suspend function is a function that can be started, paused, and resumed.
- runBlocking in Kotlin Coroutines with Example – runBlocking is a coroutine function. By not providing any context, it will get run on the main thread.
- Jobs, Waiting, Cancellation in Kotlin Coroutines – How to wait for the coroutine, and how to cancel the coroutine. Whenever a new coroutine is launched, it will return a job.
- Launch vs Async in Kotlin Coroutines – Creating coroutines doesn’t allocate new threads. Instead, they use predefined thread pools and smart scheduling for the purpose of which task to execute next and which tasks later.
- withContext in Kotlin Coroutines – withContext is nothing but another way of writing the async where one does not have to write await().
Miscellaneous
- Kotlin annotations – Annotations are a feature of Kotlin that allows the programmer to embed supplemental information into the source file.
- Kotlin Reflection – Along with Java reflection API, Kotlin also provides its own set of reflection API, in a simple functional style.
- Delegation in Kotlin – Delegation controls the allocation of power/authority from one instance to another for any object.
- Delegated Properties in Kotlin – Delegation is defined as the granting of any authority or power to another person (Boss assigning tasks to its employees) to carry out different work.
For a complete Kotlin Tutorial, you may refer to this article: Kotlin Programming Language