Azhar has Published 721 Articles

How to get the ActionBar height in Android using Kotlin?

Azhar

Azhar

Updated on 30-Nov-2020 12:58:01

341 Views

This example demonstrates how to get the ActionBar height 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 make an alert dialog fill 50% of screen size on Android devices using Kotlin?

Azhar

Azhar

Updated on 30-Nov-2020 12:53:12

417 Views

This example demonstrates how to make an alert dialog fill 50% of screen size on Android devices 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 ... Read More

How to overlay two images in Android to set an imageview using Kotlin?

Azhar

Azhar

Updated on 30-Nov-2020 12:49:54

867 Views

This example demonstrates how to overlay two images in Android to set an imageview 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 show a Soft Keyboard based on Android EditText focused using Kotlin?

Azhar

Azhar

Updated on 30-Nov-2020 12:45:19

1K+ Views

This example demonstrates how to show a Soft Keyboard based on Android EditText focused 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 maximum date in datepicker dialog in Android using Kotlin?

Azhar

Azhar

Updated on 30-Nov-2020 12:37:17

2K+ Views

This example demonstrates how to set maximum date in datepicker dialog 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 pass a String from one Activity to another Activity in Android using Kotlin?

Azhar

Azhar

Updated on 30-Nov-2020 12:32:02

2K+ Views

This example demonstrates how to pass a String from one Activity to another Activity 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 ... Read More

How to change Screen Orientation programmatically using a Button in Android Kotlin?

Azhar

Azhar

Updated on 30-Nov-2020 12:27:00

1K+ Views

This example demonstrates how to change Screen Orientation programmatically using a Button in Android 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 communicate between Activity and Service in Android using Kotlin?

Azhar

Azhar

Updated on 30-Nov-2020 12:23:05

553 Views

This example demonstrates how to communicate between Activity and Service 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 execute an Async task repeatedly after fixed time intervals in Android using Kotlin?

Azhar

Azhar

Updated on 30-Nov-2020 12:18:51

173 Views

This example demonstrates how to execute an Async task repeatedly after fixed time intervals 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 ... Read More

How to detect user inactivity for 5 seconds in Android using Kotlin?

Azhar

Azhar

Updated on 30-Nov-2020 12:13:12

520 Views

This example demonstrates how to detect user inactivity for 5 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

Advertisements