Azhar has Published 721 Articles

How to properly highlight selected items on Android RecyclerView using Kotlin?

Azhar

Azhar

Updated on 18-Aug-2020 12:00:25

783 Views

This example demonstrates how to properly highlight selected items on Android RecyclerView 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.     ... Read More

How to set the margin of ImageView programmatically in Android using Kotlin ?

Azhar

Azhar

Updated on 18-Aug-2020 11:52:32

5K+ Views

This example demonstrates how to set the margin of ImageView programmatically in Android 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.   ... Read More

How to change the color of a CheckBox in Android using Kotlin?

Azhar

Azhar

Updated on 18-Aug-2020 11:50:30

1K+ Views

This example demonstrates how to change the color of a CheckBox in Android 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.   ... Read More

How to run a method every 10 seconds in Android using Kotlin?

Azhar

Azhar

Updated on 18-Aug-2020 11:47:53

3K+ Views

This example demonstrates how to run a method every 10 seconds in Android 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.   ... Read More

How to handle the click event in Listview in Android using Kotlin?

Azhar

Azhar

Updated on 18-Aug-2020 11:45:31

2K+ Views

This example demonstrates how to handle the click event in Listview in Android 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.   ... Read More

How to check whether a headset is plugged into an Android device using Kotlin?

Azhar

Azhar

Updated on 18-Aug-2020 11:44:32

385 Views

This example demonstrates how to check whether a headset is plugged into an Android device 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. ... Read More

How to programmatically set drawableLeft on the Android button using Kotlin?

Azhar

Azhar

Updated on 18-Aug-2020 11:36:17

1K+ Views

This example demonstrates how to programmatically set drawableLeft on the Android button 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.     ... Read More

How do I get the height and width of the Android Navigation Bar programmatically using Kotlin?

Azhar

Azhar

Updated on 18-Aug-2020 11:32:20

691 Views

This example demonstrates how to get the height and width of the Android Navigation Bar programmatically 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 ... Read More

How to set only numeric values for edittext in Android using Kotlin?

Azhar

Azhar

Updated on 18-Aug-2020 11:30:08

2K+ Views

This example demonstrates how to set only numeric values for edittext in Android 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.   ... Read More

How to create a Dialog Box without a title in Android using Kotlin?

Azhar

Azhar

Updated on 18-Aug-2020 11:27:56

315 Views

This example demonstrates how to create a Dialog Box without a title in Android 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 ... Read More

Advertisements