Azhar has Published 721 Articles

How do I prevent an Android device from going to sleep mode?

Azhar

Azhar

Updated on 31-Jul-2019 08:57:40

674 Views

This example demonstrates how do I prevent an Android device from going to sleep mode.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

What is difference between onCreate() and onStart() on Android?

Azhar

Azhar

Updated on 31-Jul-2019 08:52:48

2K+ Views

This example demonstrates the difference between onCreate() and onStart() in Android.Note −onCreate() is called when the when the activity is first created.onStart() is called when the activity is becoming visible to the user.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill ... Read More

How to convert pixels to DP’s in Android app?

Azhar

Azhar

Updated on 31-Jul-2019 08:48:34

178 Views

This example demonstrates about How do I convert Pixels to DP’s 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.       ... Read More

How to limit Decimal Places in Android EditText?

Azhar

Azhar

Updated on 31-Jul-2019 08:31:28

4K+ Views

This example demonstrates about How to limit Decimal Places in Android EditText.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 play a custom ringtone/alarm sound in Android?

Azhar

Azhar

Updated on 31-Jul-2019 08:05:39

1K+ Views

This example demonstrates about How to play a custom ringtone/alarm sound in AndroidStep 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

How do I display the current date and time in an Android application?

Azhar

Azhar

Updated on 31-Jul-2019 07:58:47

588 Views

This example demonstrates about How do I display the current date and time in an Android applicationStep 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 background color of a view in Android App

Azhar

Azhar

Updated on 31-Jul-2019 07:51:32

2K+ Views

This example demonstrates about How do I change the color of Button in Android when clicked.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 Custom Dialog box on Android?

Azhar

Azhar

Updated on 31-Jul-2019 07:46:12

2K+ Views

This example demonstrates about how do I create a custom message 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 projectStep 2 − Add the following code to res/layout/activity_main.xml.       ... Read More

How to start new Activity on click button in Android?

Azhar

Azhar

Updated on 31-Jul-2019 07:34:42

18K+ Views

This example demonstrates about how do I start new Activity on click button 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 projectStep 2 − Add the following code to res/layout/activity_main.xml.   ... Read More

How to get current date and time from internet in android?

Azhar

Azhar

Updated on 31-Jul-2019 07:28:32

768 Views

This example demonstrates about how do I get date and time from internet 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 projectStep 2 − Add the following code to res/layout/activity_main.xml.     ... Read More

Advertisements