. Android Developers Blog: Search results for kotlin
Showing posts sorted by relevance for query kotlin. Sort by date Show all posts
Showing posts sorted by relevance for query kotlin. Sort by date Show all posts

Wednesday, 5 December 2018

Kotlin-bind OnClickListener on view

Hello Friends,  In this tutorial I am showing you how to bind the click listener on View in Kotlin. 1. Code snippet to set OnClickListener on Textview in Kotlin Android val tvStatic = findViewById(R.id.tv_static) as TextView tvStatic.setOnClickListener { // your code to perform when the user clicks on the...

Monday, 11 May 2020

Kotlin - Android notification in kotlin | Android MVP in Kotlin

Hello Friends,        Lets first tell you what is notification. Notification is a message that is used to display some short messages outside of our main application. Even if the app is not running, notifications will still work. Notifications have the following contents: an icon, title of...

Wednesday, 5 December 2018

Kotlin-Create TextView Programatically

Hello Friends,       In this tutorial I am going create a textview dynamically in kotlin and add it to Linearlayout layout. 1. activity_main.xml: Following is the activity_main.xml containing the TextView with the text . <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="https://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".TextViewSample"> <LinearLayout android:id="@+id/ll_main_layout"...

Monday, 11 May 2020

Kotlin - Enum Classes in Kotlin | Enum Methods | Enum Properties

Hello Friend,               Today I am going to share about Enum class in Kotlin   - How to create/initialize enum classes - methods and properties of enum classes. Initializing enums – This file contains hidden or bidirectional Unicode text that may be...

Saturday, 5 October 2019

Kotlin Android – AlertDialog – Example

Hello Friends,                 Here is the demo Alert Dialog in Kotlin. Android AlertDialog class                 is used to display a dialog box to user with positive and negative buttons. It Appears on top of...

Wednesday, 1 September 2021

Android Jetpack Compose- Android Studio with Jetpack Compose Getting Started | Jetpack Compose Tutoria

Hi All,  Today I am going to share my first JetPack Compose Tutorial. Here we learn how\nto setup android compose in android studio. We see the rquired dependency and other settings.Step 1: Installation:  First we have to download Android Studio Arctic Fox. That’s because when we use Android Studio to...

Monday, 7 October 2019

Kotlin Android - RecyclerView Example

Hello Friends,           Today I am sharing the demo of RecyclerView in Kotlin. A RecyclerView is essentially a ViewGroup of containers called ViewHolders which populate a particular item. So lets first familiar with RecyclerView and What RecyclerView requires: 1. It requires a set of...

 

Copyright @ 2013 Android Developers Blog.