- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1966 Articles for Apps/Applications
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
1K+ Views
This example demonstrates how to Create a listView with a checkBox in Kotlin.Step 1 − Create a new project in Android Studio, go to File ? New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.Example Step 3 − Add the following code to src/MainActivity.ktExampleimport android.view.View import android.widget.AdapterView.OnItemClickListener import android.widget.ListView import androidx.appcompat.app.AppCompatActivity import java.util.* class MainActivity : AppCompatActivity() { private var dataModel: ArrayList? = null private lateinit var listView: ListView private lateinit var adapter: CustomAdapter override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
3K+ Views
This example demonstrates how to Add and Remove Views in Android Dynamically in Kotlin.Step 1 − Create a new project in Android Studio, go to File ? New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.Example Step 3 − Add the following code to src/MainActivity.ktExampleimport android.content.Context import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.widget.LinearLayout import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { private var parentLinearLayout: LinearLayout? = null ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
1K+ Views
This example demonstrates how to set the Android wallpaper image programmatically in Kotlin.Step 1 − Create a new project in Android Studio, go to File ? New Project and fill all required details to create a new project.Example Step 3 − Add the following code to src/MainActivity.ktExampleimport android.graphics.Bitmap import android.graphics.BitmapFactory import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.view.View import android.widget.Toast class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" } fun setWallpaper(view: View) { val bitmap: Bitmap ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
4K+ Views
This example demonstrates how to use ArrayAdapter in android to create a simple listview in Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to MainActivity.ktimport android.os.Bundle import android.widget.ArrayAdapter import android.widget.ListView import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" val arrayAdapter: ArrayAdapter ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
3K+ Views
This example demonstrates how to get Spinner value in Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Open res/strings.xml and add the following code − Q39 crane Cuckoo Pigeon Eagle Owl Vulture WoodPecker Step 4 − Add the ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
2K+ Views
This example demonstrates how to use SearchView in the Toolbar in Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Open res/strings.xml and add the following code− Q38 January February March April May June July August ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
1K+ Views
This example demonstrates programmatically turning off and turning on WiFi in Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇉ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to MainActivity.ktimport android.net.wifi.WifiManager import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.view.View import android.widget.Toast class MainActivity : AppCompatActivity() { lateinit var wifiManager: WifiManager override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) title = "KotlinApp" ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
561 Views
This example demonstrates how to add Google Search Functionality in Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Add the following code to MainActivity.ktimport android.app.SearchManager import android.content.Intent import android.os.Bundle import android.widget.Button import android.widget.EditText import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { lateinit var editText: EditText lateinit var btnSearch: Button override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
2K+ Views
This example demonstrates how to integrate Facebook using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required details to create a new project.Step 2 − In your project, open your_app | Gradle Scripts | build.gradle (Module: app) and add the following compile statement to the dependencies{} section to compile the latest version of the SDK −implementation 'com.facebook.android:facebook-login:5.15.3'Step 3 − Add your package name and default activity class name as shown below, click save and continue.Step 4 − Create a Key hash. Based on your operating system you have to copy ... Read More
![Azhar](https://www.tutorialspoint.com/assets/profiles/124637/profile/60_166181-1565938637.jpg)
421 Views
This example demonstrates how to play videos in Android TextureView using Kotlin.Step 1 − Create a new project in Android Studio, go to File ⇒New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step 3 − Create an asset folder and copy-paste the video into the asset folder.Step 4 − Add the following code to MainActivity.ktimport android.content.res.AssetFileDescriptor import android.graphics.SurfaceTexture import android.media.MediaPlayer import android.media.MediaPlayer.OnVideoSizeChangedListener import android.os.Build import android.os.Bundle import android.view.Surface import android.view.TextureView import android.view.TextureView.SurfaceTextureListener import androidx.appcompat.app.AppCompatActivity import java.io.IOException class MainActivity : AppCompatActivity(), SurfaceTextureListener, OnVideoSizeChangedListener { private ... Read More