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

How to design New user Sign Up form layout

 In the below layout code I have created a new user Sign Up form page. Here I have created first LinearLayout all layout added in this Main LinearLayout, In below code I have also added ScrollView, Relative layout, ImageView, TextView. In dr...

Logout parse.com android

When we login through parse.com so at the time of logout, we need to clear the current user. We need to simple use method logOut() of parse. Below is the code ParseUser.logOut(); ParseUser currentUser = ParseUser.getCurrentUser(); // ...

How to create custom toolbar and use the same in different activity in android.

Here we will learn how to create custom toolbar and use it in different activity using <include> tag in xml file of the activity. 1) We will design the layout for the toolbar in our project's layout directory, I have named it as mtoo...

How to create activity as a dialog?

We know that Alert dialog boxes are used to show some popup to user so that user can perform some action. But with Activity dialog you can manage the visibility of dialog based on activity life cycles. To create an activity as a dilaog we have...

Button always showing text in uppercase-solution

I found that sometimes button showing text in upper case. I have found the solution that we just need to define property textAllCaps in the xml file. For example <Button android:layout_width="match_parent" ...

Delete a row from a table in parse.com

  Hello, It is very simple to delete an item or row from any parse table from the code. First, we need to create the object of the table that points that particular row and then delete it. I create an object using object id and t...

How to pass data from one fragment to another in Android?

To pass data from one fragment to another in android we simply make use of Bundle . In this example I am sending three String  from MainActivityFragment(Fragment)  to SecondFragment(Fragment) with the help of Bundle.  Below i...

How to create Floating Action Button Animation in android

 In the below example I have created  Floating Action Button  Animations. Here I have added four FloatingActionButton, then in second step I have created  button_open, button_close ,rotate_forward, rotate_backward xml layouts ...

How to create a Spalsh Screen in Android.

Since we know that the "Splash Screen" just appears for the few seconds as the app get start so we need to add the time for how much second the splash screen would be shown, so to add  Splash screen in Android app follow the step...

How to open Camera using intent on button click.

Here we will learn how to open camera in android, to open Camera in the android app we have to add <uses-permission android:name="android.permission.CAMERA"/> permission in our manifest file. In this example I&...

How to create popup layout

In the below example I have created popup layout. In popup.activity layout, First I have created LinearLayout, In LinearLayout I added a TextViw and Button, then in step second I have created rounded.xml layout & in drawable folder, here I ha...

How to create dialog with cross button layout in android

 In the below example I have created a dialog button layout. Here I have created a main.activity layout, In main.xml layout first I have created  Relative layout and added all layout in this Main Relative layout then I have  create...

How to open Calendar on clicking the EditText and set the date.

To open Calendar on Clicking the EditText follow the steps mentioned below:- 1) Create a Edit Text in your xml file. activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="ht...

Access Main ui from background thread in android

We know that in android only main thread can touch the UI but there are some severals methods that can touch the UI from background thread that are following as : 1. Handler 2. PostDelayed 3. RunOnUIThread 4. AsyncTask 1. Handler i...

How to create 9Patch Image

A 9 patch image is an image that has stretchable areas defined. These areas are defined in a special 1 pixel wide border around the area. Add black pixels to the top and left of this border to describe where the image can be stretched horizontal...

What is Thread pool in Android and how to use it ?

Thread pool basically manages the pool of worker thread or it manages the collection of runnable and worker threads execute Runnable from queue. Here is an example of creating threads 20 times and calling its runnable methods like this : ...

How to make custom button in android

To make Custom Button in android follow the steps mentioned below:- 1) Create a drawable resource file in your drawable folder and name it custom_button.xml. 2) Add the code written below in your custom_button.xml file .  custom_but...

Inspect Code Android

Java code file is neccesary to run the particular project and sometimes java file contains 100 lines of code or more and in that case,there are more possibilities to get error(on in future,will get error).So in this case,Android provide a feature...

How to search from a list in android?

We have a search edit text and a list in layout , activity_main.xml   <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_...

Easy way to add RenderScript Supprot in Android Studio

RenderScript is used to run high performance tasks in Android. RenderScript is plateform- Independent. RenderScript added from API-17 but added support later. For adding support for RenderScript in Android Studio add below lines in build.gr...

How to create a thread ?

Thread is basically used to execute something in android. Thread class provides start method to start a new thread as well as we can also use Runnable interface to create some thread. So there are two way to create a thread that are : 1. By...

What is looper in android ?

We know that a normal thread doesn't maintain any message queue they runs one after another but in case we want to performs more thread then we used looper class to maintains all runnable messages in queue and runs them one by one . Here i...

What is main and background thread and how to touch ui from background thread ?

Multithreading is  a meachanism where a one user can access more than one process or you can say that an operating system can perform more than one operations simultaneously. In Android we have two types of thread that are Main thread and...

Creating Keystore from Terminal or command Prompt for android

Now a days android studio has provided pretty simple and easy GUI for creating key-store from the IDE itself but in case if you have some need for creating it through the command line here is a simple tutorial for the same.   Step 1. &...

How to show the full size image in popup on clicking the image in android

Below is the code that will show the full size image in a dialog box popup without defining layout xml file .   In the code below I have taken two imageview named profile_pic and pro, to get the OnTouchListener action of particular ima...

How to make multi pane layout for Mobile Phone and Tablet

In this example,we will have a layout in which there are two fragments in an activity.   In our mobile phone,we will show only one fragment but in tablets,we will show both fragments simuntanously. activity_main.xml (for mobile phon...

How to add Volley in Android Studio?

In 3 basics steps,you can add volley to your project:   Step 1:First, you need to get the Volley source code: Use Git to checkout the source code for Volley, preferably to the filesystem where your Android project lives. git cl...

How to keep your android app popular even after launch?

Imagine that your android app has been launched in Google Play Store for users to download and install it on their android phones or android tablet computers and the app has been doing well in the market. Your app has started to generate interest...

Tutorial on Services in Android

Below points are covered in this tutorial What is a service Usage of a service Services Vs AsyncTask Types of services

How to create rotate animation buttun in android

 In the below example I have created rotate animation button. In below code I have used scale and translate effect on rotate animation button. Here I have added Button in button i have used an img and added a TextView in activity_main xml la...

How to create alpha effect animation button android?

In my previous blog I have explain how to create animation button in android. Now in this below example I have created new animation button which is alpha effictive. Here I have added Button and TextView in activity_main xml layout then I have...

How to create Animation button in android

In the below example I have created a animation button. Here I have added Button and TextView in activity_main xml layout then I have created new directory (anim) , In anim directory I have created new anim_traslate.xml layout. In MainActivity I ...

How get user input on same xml. Layout in android

 In the below example I have created a demo page for user input. Here when user will enter name and phone number then user name and number  will show on same page. Here I have created first Relative layout then in relative layout added ...

Vector Graphics in Android.

Hello Friends, In this blog we will learn about VectorDrawables and change icon color on Runtime. From Android Studio 1.4 Google release new feature to support Design library. VectorDrawable has introduced in API 21(has support for lower v...

running apps over wifi

Getting messed up with usb cables on your desk or tired of buying new usb cables every week ?? Here is a new way for running your apps and debugging them without connecting them to your pc using usb cable. Just a set of commands and yo...

How to remove item from ArrayList

The below example will help you to remove an Arraylist item using the element index. To remove an item from an arrayList I have used Object remove (int index) method. This method returns a reference to the item that was removed. You can see below...

Screenshot with Frame in android

Android studio gives a feature to create frame for your Screen-shots. It is useful and looks good at the time of publishing app on GooglePlay. Here are the steps to take Screen-shot with frame in Android Studio. 1. Open DDMS from Android Mo...

Screen Recording with Android Studio

Hello Friends, Sometime we need to record Android Screen as Movie. This is very useful for Bug reporting and for app promotion. Android Studio has ability to record device's Screen as movie. Android studio give button in DDMS to record vi...

How to make Custom Animation switching Activity

In the below example I have created Custom Animation while Switching Activity. Here I have created two activity, In first activity I have added left and right xml using methodTransition() and in Second activity I have added top and bottom xml. Al...

How to make Publication Article page layout in android

In the below example I have created PublicationArticle layout. Here Frist I have created LinearLayout and then created all layout within main layout after then I have added scrollbar in main layout, In scrollbar I have added TextView, Image View,...

How to reverse linkedlist in java ?

There are two way to reverse a linked list that are using recursion or using iteration. This operation takes O(n) time complexity during iteration method. Here is the code to reverse linked list using iterator : public void reverseLinked...

How to merge linked list in java

If we have two sorted linked list and we want to merge both in a new list without creating new node space then we can use recursive approach for this . This approach takes O(max(m,n)) time complexity for merging. Like we have a linked list nam...

Deletionin linkedlist in java

A linked list is type of data structure that contains items in linear order. Deleting an item from linked list performs O(n) time complexity. you can perform two type of deletion from linked list either you can delete first item of list or in any...

How to create registration screen design in android

In the below example I have created registration page layout. Here FIrst I have created LinearLayout and then all layout within a main LinearLayout after then I have added Toolbar, scrollbar, TextView, ImageView I have also used RelativeLayou...

Linked list implementation in android

Linked list is a type of data structure that is a collections of nodes where nodes linked to one another using some pointer or reference. linked list is efficient for insertion operations because it uses two pointer head and trail that make it ea...

How to change icon and color of FloatingActionButton

Here I am writing the way to change the color and icon of FloatingActionButton. If I talk about icon of the action button, we need to fulfill of requirement and purpose of Floating button. So we need to change the icon of the FloatingActionBu...

Slide Top to Bottom View Animation

To show animation on any view like on ImageView, I am implementing animation to show slide a view from top to bottom. We need to create an xml file in anim folder. Here name top_bottom.xml <?xml version="1.0" encoding="utf-8"?> <s...

How to get your latitude and longitude in android.

Follow the steps mentioned below to get your location latitude and longitude 1) Create a class and name it LocationManger.java and impliment GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener in ...

ImageView takes Full Width

Below is the code to adjust ImageView taking full width. It is mainly required when we need to show cover photos which take the full width of the screen. The images that are in landscape looks ok, but we find a problem with the portrait pic...

Open facebook, twitter and linkedIn user profile using username

Sometimes we need to open user profile of Facebook, Twitter or LinkedIn by using the username in android. To do this, we just create a uri to open the profile. We can implement this in onclick() of any view. For Facebook: String url =...
1 7 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: