Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Write Hello World First Kotlin App



AndroidManifest.xml

 
package="com.example"
android:versionCode="1"
android:versionName="1.0">
android:label="@string/app_name">




main.xml 


android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF"
>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/hello" android:contentDescription="Hello World I'm running Kotlin!"/>
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Kotlin M2 Candidate"
/>



KotlinActivity  

package com.example
import android.app.Activity
import android.os.Bundle

class HelloKotlin() : Activity() {

protected override fun onCreate(savedInstanceState : Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.main)

}
}



This post first appeared on DHARAMENDRA KUMAR MISHRA, please read the originial post: here

Share the post

How to Write Hello World First Kotlin App

×

Subscribe to Dharamendra Kumar Mishra

Get updates delivered right to your inbox!

Thank you for your subscription

×