- Trending Categories
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 1966 Articles for Apps/Applications
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
1K+ Views
In some situations, We should not allow onClickListener for a view. This example demonstrates how to remove onClickListener for a 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/acitivity_main.xml. In the above code, we have taken a text view, In this example, we should remove onClickListner for this text view.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
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
6K+ Views
In some situations, we need to recall activity again from onCreate(). This example demonstrates how to reload activity 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 text view, when a user clicks on text view, it will call Main Activity again.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; 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; import ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
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
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
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
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
3K+ 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
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
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
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
3K+ 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
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
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
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
3K+ 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
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
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