Azhar has Published 721 Articles

How to use the recyclerview with a database in Android?

Azhar

Azhar

Updated on 22-Nov-2019 09:03:27

4K+ Views

This example demonstrates how do I use the recyclerview with a database in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Add the following dependency in the build.gradle (Module: app)implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' ... Read More

How to detect device is Android phone or Android tablet?

Azhar

Azhar

Updated on 22-Nov-2019 08:48:25

2K+ Views

This example demonstrates how do I detect the device is an Android phone or Android tablet.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 detect touch and its position on Google map in Android?

Azhar

Azhar

Updated on 22-Nov-2019 08:11:36

630 Views

This example demonstrates how do I detect touch and its position on Google map in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Google Maps Project and fill all required details to create a new project.Step 2 − Add the following code to ... Read More

How to set selected item of Spinner by value instead of by position on Android?

Azhar

Azhar

Updated on 22-Nov-2019 08:04:30

4K+ Views

This example demonstrates how do I set the selected item of Spinner by value instead of by position on Android.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 ... Read More

How to determine Android device screen size category (small, normal, large, xlarge) programatically?

Azhar

Azhar

Updated on 22-Nov-2019 07:58:57

555 Views

This example demonstrates how do I determine the Android device screen size category (small, normal, large, xlarge) programmatically.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 display count of notifications in Android App?

Azhar

Azhar

Updated on 15-Nov-2019 12:31:36

306 Views

This example demonstrates how How to display the count of notifications in Android App launcher.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 implement a custom AlertDialog View in Android?

Azhar

Azhar

Updated on 15-Nov-2019 12:23:59

973 Views

This example demonstrates how to implement a custom AlertDialog View in Android.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 ... Read More

What is the height of the status bar in Android?

Azhar

Azhar

Updated on 15-Nov-2019 12:14:57

2K+ Views

This example demonstrates how to height of the status bar in Android.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 ... Read More

How to animate RecyclerView items when they appear on screen?

Azhar

Azhar

Updated on 15-Nov-2019 12:11:51

946 Views

This example demonstrates how to animate RecyclerView items when they appear on the screen .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 the corners of a button round in Android?

Azhar

Azhar

Updated on 15-Nov-2019 11:59:19

3K+ Views

This example demonstrates how to make the corners of a button round in Android.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 ... Read More

Advertisements