Mada Unit5
Mada Unit5
Unit– V
Introduction to Android Development using Kotlin
❖ What is Kotlin?
➢ Kotlin is a statically typed, object-oriented programming language that is
interoperable with the Java virtual machine (JVM), Java Class Libraries and
Android.
• Data science: Kotlin is often used for data science tasks, such as building
data pipelines and putting machine learning models into production.
Mobile Application Development Course Code: 4350703
activity_main.xml
Create an activity_main.xml file in layout folder and add the following code.
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Mobile Application Development Course Code: 4350703
</android.support.constraint.ConstraintLayout>
MainActivity.kt
Create MainActivity.kt file in example.app.javatpoint.helloworld package add the
following code.
package example.app.javatpoint.helloworld
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
Output:
myToast.show() ;