Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Snackbar in android

Basically snackbar use to show message like a Toast but here the advantage is we have event to interact in it. It shows message on the bottom of the screen. And it will remove when we swipe off. First of all add this in your gradle file d...

Add custom ringtone on Notification

In our application, we can add notification ringtone as we want. Here is the solution. First of all we need to create a folder named raw in /res/ file. After creating the folder put your ringtone in raw folder. Then put this code when you...

How to know the call state in Android

Android provide us the facility to know the call state. Android gives this feature by providing Telephonymanager class. We need to implement PhoneStateListener interface that has one method onCallStateChanged(). Below is the example. publ...

Sliding animation when switch to other activity

We can add animation on activity switching. First thing that we need to do is to create xml for animation. Here I am using two xml for in and out. animation_in.xml set xmlns:android="http://schemas.android.com/apk/res/android" android:sh...

DVM in Android

DVM i.e., Dalvik Virtual Machine is basically a virtual machine for android and specially made for mobile devices. DVM was written by Dan Bornstein. Now a days JVM has improved so much that it provides amazing memory management and better p...

ATTACH SQLite Database

Hi, Sometimes, we have many database and we need to use any one of them. In this situation we use SQLite ATTACH DATASE statement to choose a specific database. Syntax of the command: ATTACH Database YOUR_DATASE_NAME As Alias-Name; ...

Animation to DialogFragment in android

Hi, Here I am adding sliding animation to DialogFragment First I am adding animation xml in res/anim folder. Then creating custom style that add to the particular fragmentdialogs's onStart() method. slidestart.xml <set xmlns:a...

Automatically move to next edittext in android

Hi, In android, we have TextWatcher interface to keep track of input that we are typing. Usually it is very useful when we need verification on the basic of text length and content also. It has method onTextChanged(CharSequence s, int star...

Spelling Checker in Android

Android provides a special feature for checking spelling and it is easy to implement in your App. Android provides SpellCheckerSessionListener listener that handles spelling checker. For spelling checker, we have to implement SpellChe...

Custom Fonts in Android

Android gives us the facility to customize our strings font. For this we need to keep .ttf files of the specific font in assets/fonts folder. We can easily download ttf from internet that we want to apply. Then we use Typeface class t...

Communication between Fragments

Here I will explain how we can communicate between two fragments in an Activity. There are many situations where we have to communicate two fragments like we have to pass data between fragments in some events. Here I will communicate through Inte...

Add Dynamic Layout in Android

Generally we add layout from xml but sometimes we need to add layout using java. Here I am adding linear layout from java file. I am creating LinearLayout class which is provided by Android and add params on it. We have methods to set orientation...

Different Language Support in Android

Android gives us the facility to support different languages in your application. The solution is very easy, you just have to define separate values folder for each language and define every String there. You need to add a hyphen and ISO language...

Delete long running resources at onDestroy() in Android

Our Activity do most of the cleanup function in onPause() and onStop() callbacks. But Sometimes some resources leaks memory like long-running services, background threads.This usually happens when we dont closed it properly. So we need ...

There is an Application to Receive the Intent or not in Android

Hi friends, For Implicit intent, we dont need to declare the name of the class but we declare the action that we are doing to perform. Like here we make a call Uri callUri = Uri.parse("tel:100"); Intent intent = new Intent(Intent.AC...

Get Country name without using location

Hi... Usually we get country name by using our location via GPS settings. But somehow on situations we need to get country name without using GPS. For these situation, Android provides Locale to get our device's country name. We are us...
prev 1 2 next
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: