Posts

Image

android kotlin current date example

In this An article today learn get current date android for using kotlin language to follow the code:   val current = LocalDateTime.now()           val formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy. HH:mm:ss")           label_date.text = current.format(formatter)   Follow the code for  android kotlin current date example: 1.MainActivity.kt: import java.time.LocalDateTime import java.time.format.DateTimeFormatter class MainActivity: AppCompatActivity() {     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         setContentView(R.layout.activity_main)         val current = LocalDateTime.now()         val formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy. HH:mm:ss")         label_date.text = current.format(formatter)     }  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {         val current = LocalDateTime.now()         val formatter = DateTimeFormatter.ofPattern("dd.MM.yyyy. HH:mm:s

android kotlin listview example

In this article, today learn android kotlin listview example . Listview is a set of array adapter. for the more information visit google developer listview Android ListView displays data vertically with each item positioned below the previous data items. ListView is scrollable. You can use ListView without any issues for displaying a few data items in UI. But for displaying large volumes of data as a list, you need to use  to build well-performing apps.        1.MainActivity.kt: import android.support.v7.app.AppCompatActivity   import android.os.Bundle   import android.widget.Toast   import kotlinx.android.synthetic.main.activity_main.*         class MainActivity : AppCompatActivity() {       val fruit = arrayOf<String>("Mango","cocunt","apple","Cherry","orange")       val description = arrayOf<String>(               "Mango is fruit",               "cocunt is fruit",               "apple is fruit&q

what is kotlin language

Introduction kotlin language family the programming language family and his name is Katalin his or her whatever his name is Kotlin and finally Kotlin is in here now in case you missed out the news recently Google IO News Google has finally announced that for the Android official first-class support will be given to the Catalan and you can almost say that Kotlin is official in for Android development and Java is almost pushing out on the frame so this is the current news.     but you're not here just to listen that hey this is all no we have to discuss quite a lot of things and this is the most perfect time to get started in Android how is that now all of this is coming up in this video so roll that intro but don't forget the drum roll for Copland so in case you have been following the news Carlin is finally in  so Kotlin is the new official programming language.   automatically by the editors like eclipse or IntelliJ whatever you are using but hey why that much of the c

Kotlin camera intent example

Kotlin camera intent example today learn this topic. Camera intent kotlin source code. From this Article. Follow the manifest permission using permission camera open. for more information visit google developer page   If an the kotlin camera intent example essential function of your application is taking pictures, then restrict its visibility on Google Play to devices that have a camera. To advertise that your application depends on having a camera, put a   <uses-feature>  tag in your manifest file:   <manifest ... >     <uses-feature android:name="android.hardware.camera"                   android:required="true" />     ... </manifest>   The Android way of delegating actions to other applications is to invoke an  Intent  that describes what you want done. This process involves three pieces: The  Intent  itself, a call to start the external  Activity , and some code to handle the image data when focus returns to your acti

android kotlin toast example

In this Article today learn android kotlin toast example . toast is using the display message. from the android app. The message displayed using Toast class displays quickly android kotlin toast example . follow the source code kotlin toast example. for more information visit google developer. follow the source code for android kotlin toast example. 1.MainActivity.kt: package example.akash.kotlintoast      import android.support.v7.app.AppCompatActivity   import android.os.Bundle   import android.view.Gravity   import android.widget.Toast   import kotlinx.android.synthetic.main.activity_main.*      class MainActivity : AppCompatActivity() {          override fun onCreate(savedInstanceState: Bundle?) {           super.onCreate(savedInstanceState)           setContentView(R.layout.activity_main)           button.setOnClickListener(){               Toast.makeText(applicationContext,"this is toast message",Toast.LENGTH_SHORT).show()                  val toast = Toast.makeText(app