Starting Activity with (Kotlin) - Android Studio
How to start an Activity on Click in Kotlin using Android Studio? In this tutorial we will learn how to start a new activity when a button is clicked(you can also implement this on item click or something else). Step 1: Create a new Project with Kotlin Support OR open a new Project Step 2: Create a new Activity(when button is click we will go to that activity) Step 3: Code activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://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" android:orientation= "vertical" android:gravity= "center" tools:context= ".MainActivity" > <Button android:id= "@+id/button" ...