Posts

Showing posts from April, 2020

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

kotlin notification example

Android Notification gives short, convenient data about the activity occurred in the application, even it isn't running. The notification shows the symbol, title and some measure of the substance content. Notification is a message that is utilized to show some short messages outside of our primary application. Regardless of whether the application isn't running, notifications will in any casework. Notifications have the accompanying substance: a symbol, title of notification and some content substance. follow the example    kotlin notification example Set Android Notification Properties setSmallIcon() : it sets the icon of notification. setContentTitle() : it is used to set the title of notification. setContentText() : it is used to set the text message. setAutoCancel() : it sets the cancelable property of notification. setPriority() : it sets the priority of notification. 1.MainActivity.kt: import android.app.NotificationManag

kotlin android textview

In this article today learn how to declare textview in  kotlin android so follow the example of the kotlin android textview. follow the source code  kotlin android textview: 1.MainActivity.kt: import androidx.appcompat.app.AppCompatActivity  import android.os.Bundle  import android.widget.TextView  import android.widget.Toast     class MainActivity : AppCompatActivity() {             override fun onCreate(savedInstanceState: Bundle?) {              super.onCreate(savedInstanceState)              setContentView(R.layout.activity_main)                 //accessing our textview from layout              val textView = findViewById<TextView>(R.id.text_view_id) as TextView              textView?.setOnClickListener{ Toast.makeText(this@MainActivity,                  R.string.text_on_click, Toast.LENGTH_LONG).show() }          }     }  2.activity_main: <?xml version="1.0" encoding="utf-8"?>  <LinearLayout     xmlns:android="http://schemas.android.com/apk/

kotlin intent example

In this article today learn kotlin intent example. For android studio. Intent as using a one activity to another activity so follow the source code kotlin intent example. Android Intent is an informing object used to demand another application part to play out an activity. Intent encourages clients to speak with application segment through a few different ways, for example, beginning an activity, beginning a help, conveying a communicate recipient, and so on.   Intents (android.content.Intent) are the informing framework by which one activity can dispatch another activity. An activity can, for example, issue an intent to demand the dispatch of another activity contained inside a similar application. Intents additionally, be that as it may, go past this idea by permitting an activity to demand the administrations of some other suitably enrolled activity on the gadget for which authorizations are arranged. Consider, for example, an activity contained inside an application that requ