Horje
intent in android kotlin Code Example
intent in android kotlin
val intent = Intent(this,HelloActivity::class.java) 
startActivity(intent)

Why do we need to add .java in the end? Isn't HelloActivity a .kt file? 
    ts because you are calling Java Code from the Kotlin as Intent is a Java
    Class in Android which accepts .class reference as mentioned below. 
    Intent(Context packageContext, Class cls) Kotlin class reference is not 
    the same as a Java class reference. To obtain a Java class reference, use 
    the .java property on a KClass instance as SampleActivity::class returns 
    KClass which is Kotlin class not a java class. So you cannot pass Kotlin
    class reference to Java (Intent in your case) and so you have to pass Java 
    class reference




Whatever

Related
flutter textfield cursor position Code Example flutter textfield cursor position Code Example
Extract phone number from text regex Code Example Extract phone number from text regex Code Example
debugging Code Example debugging Code Example
React redirect Code Example React redirect Code Example
litecoin value Code Example litecoin value Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7