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

How to create a custom keyboard on android

If you are interested in making your own Soft Keyboard in android, then this tutorial will be helpful for you. Below are few steps to learn how to create your own Soft Keyboard that can serve as your own default keyboard. Step1: To enter a tex...

How to save and fetch data in local device in android .

Here I have created save data item and fetch data Item from local server. In below code first I have created DatabaseSave class and craeted database like Caller name ,CallerDetails,CallNumber etc. After defining database class I have created tab...

How to make Image View and scrollView in android

Here I have created Set Image and Image ScrollView. In the below example when we clicked Image that image will be set on page. Below example will described you how to make Image View and ScrollView. Step(1)activity_main.xml Layout- <?xml v...

Make Textview underline

Sample code to make a textview underline - tvPrivacy3.setPaintFlags(tvPrivacy3.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG); And sample code to make textview strike line tvPrivacy3.setPaintFlags(tvPrivacy3.getPaintFlags() | Paint.ST...

Multidex with Gradle

APK uses executable bytecode i.e Dalvik Executable (DEX) files to run an app. The dex file limits the total number of methods in a single dex file to 65,536, including Android sdk methods, library methods, and methods in our code. But sometimes i...

Convert Currency code to symbol Android

Hello Friends, Here is simple code to convert currency code to symbol in android. public String getCurrencySymbol(String currencyCode) { try { Currency currency = Currency.getInstance(currencyCode); return currency...

How to access call logs in android.

Easiest way to get the call duration of last call in android device is by using CallLog.Calls. Content Provider CallLog.Calls is used to provide access to the call logs data. CallLog.Calls provides interface between data and the code, also it con...

Implementing Fragment in Android

In this example we are using two fragments Fragment1 and Fragment2 where Fragment1 consist of a button named click, this button will show the Fragment2 on clicking the Click button. To implement Fragment in Android follow the steps mentioned b...

Volley api to post parameters

Volley api is powerful api to perform network operation like to perform long running network operations. you have to create HashMap that will contain key value pair for each variable and then put that hashmap object in JsonObjectRequest as a p...

Add element to Array in parse.com Android

Here I am writing code to add an element to Parse Array. It is very simple to add values to parse array. We need to insert using add() or addUnique() instead of put() method. So for normal column, we use put() method of ParseObject and for...

How to show progress in a ProgressDialog while downloading

Progress dialog in android to show progress indicator/updates while downloading a file or when waiting to load a file while playing a game. Progress dialog have various features like:- setMessage() to display message Example: Loading... (or) P...

How to download a file with android.

Downloading in android devices i.e receiving data from remote system. In android devices Download manager is a system service that is used to download and manage any type and size of file. We have two nested classes first is DownloadManager.Query...

How to implement Drawable Animation in Android.

To implement Drawable Animation in Android follow the steps :- 1) Prepare a series of images with the individual frames of your animation. Add the images to your projects drawable folder. 2) Declare a XML file that defines the animation se...

Compare two Date object in Java

Sometime we need two compare two dates like which Date object's time coming first or last. Here is the code to compare two dates. Date date1; Date date2; if(date1.before(date2)){ System.out.println("Date 1 is before date ...

Putting GIF images in your Android application

Put Your GIF image in /raw folder and put the below code in your project public class CustomGifView extends ImageView { Movie movie; InputStream inputStream; private long mMovieStart; public CustomGifView(Context contex...

How to make option menu function in android.

In this blog we are inflating the menu by using inflate()method of the menuInflater class this can be performd event handling on menu items, when we need to override then we can used onOptionItemSelected()method of activity class. Hence using bel...

How to upload large files from Android device to server

Android developers do face the exception when sending large file from Android device to a server. To send large file to a server you have to make the file into small size chunks and then send it to the server. setChunkedStreamingMode(1024), thi...

How to make Menu Slider function in Android?

If you are looking to create Sliding menu in android below example will help you.In android Sliding menu is used to hide and show menu items. In below example I have create multi layouts here like fragment layout using for dividing menu item . fr...

How to impliment view Animation in Android

To implement view Animation in Android follow the steps mentioned below:- 1) Start a new project in android studio. 2) Now create a new Android resource Directory under res directory then choose interpolater option in directory type and nam...

Property Animation Android

1) Here I will rotate a View around its vertical axis using the rotationY property. we will create an XML resource file in the /res/animator directory named as flip_on_vertical.xml. <objectAnimator xmlns:android="http://schemas.android.com/...

Dynamically adding ListViewItem to Listview

To dynammically add new elements into listview we need a Edittext(etAddItem) to input the item/element, a Button(btnAdd) for adding item to the list, and a listview which shows elements in a vertical scrolling manner. etAddItem = (Edit...

How to refresh a List in Android?

1)Write activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent...

Freeze TextView text while restore fragment from Backstack/ onOrientationChange

Some time TextView lost text while getting fragment from Back-stack or when screen orientation changed. I also faced that problem. Here is the solution for save state of TextView forcefully. Add Tag android:freezesText="true...

How to make Action Bar in Android?

Here I have created Action Bar in android. In android Action Bar is used to provide navigation and perform some actions. In this blog I have implement a Action Bar in my Android project and perform actions such as switching fragment. Below ex...

How to make SeekBar in android?

Below code will help you to created SeekBar function in android. In android SeekBar is used by the end user, the user can drag the left and right to move the progress of runing file like audio song, video song etc. In the below code example, I h...

How to make Digital clock in android?

Using below code I have created Digital clock app in android. Android digital clock is used to show time in android app. In android, digitalclock is the sub class of TextView class. Here below code example will help you create Digital Clock funct...

Remove duplication from array list

If you want to remove duplicate entries from your array list you can use hash set to make all items unique rather than use of algorithms. Set is a ordered collection of items and contains only unique items. And Hashset creates a collection th...

How to Add items Dynamically in RecyclerView?

RecyclerView is works just like listview but more well organised, felexible to customize and optimize to work and in rendering the view of large data set. So in this tutorial we will see how to add items Dynamically in RecyclerView.   ...

Utc time to Local time conversion

If you are working on meeting schedule functionality in your android app and you are stuck with the timezone then this example can guide you. If you are getting the time, timezone from server and time is in UTC then you should not have to ap...

Show loading when load page on WebView

Here I am writing code to load url on WebView. We need to create WebView client where we get the event of page finished. Then simply showing ProgressDialog and dismiss it on onPageFinished(). WebView myWebView ; myWebView = (WebV...

Strike text of TextView in Android

When we need strike text in android most of the time we do strike text with the help of HTML tag. But Here is simple way to strike TextView's text in android with native code textView.setText("This is Strike text"); textView.setPaintFl...

Date Picker Material Design

I am writing way to add and use date Picker Material design library to our project. First of all we need to add library to our build.gradle file dependencies { compile 'com.wdullaer:materialdatetimepicker:1.5.4' } Then we need to imple...

LibPhoneNumber library implementation - An easy way to fetch phone contacts

Are you Looking for a better library that can fetch all phone contacts easily and that can manage all numbers in common formats. Then LibPhoneNumber library is a better solution because this library is faster then other handmade queries. This lib...

How to make ProgressBar function in android?

Here I have created ProgressBar app in android in which I have used setProgress(), setMessage(), setProgressStyle(),setMax,show() function. Below code example will help you to create RatingBar function in android. Step(1)-activity_main.xm...

Save Image File on Parse.com Android

Here I am getting image path from Native data Here IMAGEPATH is the path of image from Camera. ByteArrayOutputStream stream1 = new ByteArrayOutputStream(); // Compress image to lower quality scale 1 - 100 bitmap1...

Retrieve Image file from parse.com and set on ImageView android

It is very easy to retrieve image file from parse.com. For example the image file name profilePicture is save on User class and I am going to retrieve the image below. ImageView profilePic = (ImageView)findViewById(R.id.image_profile); P...

Transparent Button with Border

Here I am writing code to create transparent button with border. First create xml file transparent_button.xml for selector where I am describing the properties of button like border width, color etc <!--?xml version="1.0" encoding="utf-8...

How to make RatingBar in android ?

Here I have created RatingBar function in android. In android RatingBar can be used to get the rating from the user, it is also used for creating RatingBar. Below code example will described you how to make RatingBar function in Android. Step(...

To create database and insert data in SQLite, in android

If you are looking for the code in android to create database and insert data in SQLite then follow the steps mentioned below:- 1) Create a layout in which the data will be filled that will be inserted into database. activity_signup_form....

How to make CheckBox in android ?

Here I have created Checkbox function in android. In android CheckBox is a type of two state button either checked or unchecked. We can use checkbox to activate/deactivate the specific action. In the below code example, I have described how to ma...

How to pass value from one Activity to Another through Bundle Intent?

1)Suppose need to pass value from MainActivity to SubActivity.We will first make xml of both Activity: activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android....

How to get Package information programmatically in Android

In some cases we have to get global information about application environment programmatically. We will get package name, version name, version code, application info and last updated time using the PackageInfo class which contains all of the inf...

How to change backgraund color View on select radio button in android?

Here I have created change backgraund color View app. when we select any radio button then it will change the backgraund color. In the below example i have use four radio button on diffrent colour id. You can use the below code to change backgrau...

How to make Popup function in android?

Here I have created Popup function , Popup function can be used to display menu item list, anchor text and listitem etc. In the below example when we clicked on menu button the popup will be open and if we click outside the popup it will disappea...

How to get Exact path of a photo saved in Mobile Gallery?

1)Suppose we have a Button and a TextView in XML: activity_main.xml <Button android:id="@+id/btnGet" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="GET IMAGES" /> <TextVi...

get Added accounts email from device Android

Blow code get list of Emails account from AccountManager. AccountManager manager = (AccountManager) mActivity.getSystemService(mActivity.ACCOUNT&#95;SERVICE); Account[] list = manager.getAccounts(); if (list.length &g...

Date Picker Dialog and Time Picker Dialog in Android

Android provides Date and Time Picker dialog, user can select appropriate date and time as per his need. With DatePickerDialog we can select date, month and year using Calendar class. setMaxDate(long maxDate) and setMinDate(long minDate) meth...

Customize seekbar in android

If you want to customize seekbar in Android then follow the steps mentioned below:- 1) To customize seekbar background create a new xml file in your project's drawable folder . seekbar_background.xml <?xml version="1.0" encoding="utf-...

How to make Toast with AlertDialog in android?

Here I have created Toast with alertDialog code function, according to below code both function runs in same time and display same time when we clicked listview item. In the below code I have explain how to make toast with AlertDialog function in...

Android Expandable ListView

Expandable listview is used to categorise data in some specific type. Expandable list can have a two level scrolling list. Using ChildDivider feature we divide list items with drawables or colors, and ChildIndicator & GroupIndicator is for st...
1 11 15
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: