Day 1 : Kotlin Basic Setup and Toast

1550620800000 Kotlin

by Start Bootstrap


Choose "Kotlin"  as the development language and create a Blank Activity which gives you basic Project Setup. Among it, the below are the only required items in for the Home Activity

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
}

And adding a function is as easy like 

this.callMe();
private fun callMe() {
// Function called
}

Pretty much javascript :p 

And toast like this

import android.widget.Toast
Toast.makeText(this@YourActivity, "Hello there", Toast.LENGTH_SHORT).show();

 

That's it ! 


Blog Search
Tags
  • Sysaxiom (4)
  • Github (8)
  • Windows (1)
  • php (25)
  • General Tips (0)
  • GoogleMaps (2)
  • Google App Script (1)
  • Heroku (4)
  • Laravel Middleware (1)
  • xampp (1)
  • Terminal (1)
  • TechCrunch (1)
  • Ubuntu (3)
  • MySQL (2)
Side Widget
can put anything you want inside of these side widgets. They are easy to use, and feature the new Bootstrap 4 card containers!