- 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 2041 Articles for Mobile Development
1K+ Views
There are so many situations, where we should not call back action when user click on back button.This example demonstrates how to integrate Android Login and register form.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/actvity_main.xml. Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.widget.Toast; public class MainActivity extends AppCompatActivity { int view = R.layout.activity_main; @RequiresApi(api = ... Read More
4K+ Views
This example demonstrates how to get Custom circle 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 project.Step 2 − Add the following code to res/layout/actiivity_main.xml. In the above code, we have taken the button with a round_button background. so create round_button.xml in drawable folder and add the following code. ... Read More
2K+ Views
In some cases, we should not allow application should run on rooted devices for payment gateways. This example demonstrates how to determine if running on a rooted device or not.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. In the above code, we have taken a text view. It contains information about root.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; ... Read More
3K+ Views
This example demonstrates how to check email Address Validation in Android on edit Text.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. In the above code, we have taken edit text and button. When the user clicks on a button, it will check edit text data and validate that data.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import ... Read More
2K+ Views
This example demonstrates how to add shadow Effect for a Text 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. In the above code, we have taken a text view with shadow properties as shown below -android:shadowColor = "#000" android:shadowDx = "-2" android:shadowDy = "-2" android:shadowRadius = "1"In the above tags indicates about shadow color, Axis's(X, Y) and shadow radius for text view.Step 3 − Add the following code to src/MainActivity.javapackage ... Read More
2K+ Views
There are some situations, we need to restart whole application programmatically. This example demonstrates how do I programmatically “restart” an Android app.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. In the above code, we have taken a text view. When the user clicks on text view, it will restart the whole application.package com.example.andy.myapplication; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.view.View; ... Read More
2K+ Views
In some situation, we need to find an android activity orientation. This example demonstrates how to integrate Android Login and registration form.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. In the above code, we have taken a text view. According to screen orientation, text view going to update the text.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; ... Read More
2K+ Views
This example demonstrates how to verify enter number is phone number or not, using regex 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. In the above code, we have taken Edit text and text view. when the user clicks on text view, it will take data from edit text and valid the data.Step 3 - Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; ... Read More
1K+ Views
By default, android provides shadow for action bar. This example demonstrates How to remove shadow below the action bar.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 src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.widget.TextView; public class MainActivity extends AppCompatActivity { int view = R.layout.activity_main; TextView text; @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) @Override protected void onCreate(Bundle savedInstanceState) ... Read More
637 Views
Sometimes we click back button unintentionally, When you click on a back button it will close your application or will go back to another activity. To avoid this problem, This example demonstrates how to make back button twice to close an activity.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 src/MainActivity.javapackage com.example.andy.myapplication; import android.app.ActivityManager; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.os.VibrationEffect; ... Read More