Featured
-
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
An Overview of Android Activity - Video Tutorial
As far as Android platform is concerned, the funda
by amit.rai -
How to get IMEI number,serial number and software version of your phone
Hello... Sometimes we need to know the country
by shahbaz.ahmmod -
Search location by using place on google map
Here below is the code for searching places by usi
by shahbaz.ahmmod -
How to know free space in sdcard android
I have written code to know free space in sdcard
by shahbaz.ahmmod
Tags
How to make Full Screen Navigation Drawer layout in android?
In the below example code I have created Full-screen Navigation Drawer layout with the help of FullDrawerLayout class.
Step(1)-activity_main.xml -Here I have added package name with FullDrawerLayout class name
<?xml v...
Android Architecture
Android Architecture is a bundle of software components. Android is Linux-based software stack that has some software components like operation system, middleware, native applications, API libraries.
Android Architecture has five section...
How to blur background image using BitMap?
In the below example code I have created blur background image function. In activity_main.xml layout I have added a Button and ImageView.
Now see programming area, here I have used Bitmap class. When a user clicks on button background im...
Swipe Items left or right
At certain application there is need to integrate swiping feature with your UI component, to make the UI more interactive.
Here we are taking a simple example in which one swipe the items of recycler view left or right .
For this we u...
How to use Bottom Sheet in android ?
A Bottom Sheet is a layout that slides up from the bottom side of the screen. This layout slides up on user triggered action. There are two options to implement this functionality, the first one creates main container view with a BottomShee...
How to use FlexBox Layout in android?
FlexboxLayout is a newly introduced library in android and alike CSS Flexible Box Layout Module to Android it has the same ability. Flexbox Layout works similar to the LinearLayout in android, it places children view sequentially. Each child...
How to change EditText cursor color?
Hello,
This blog will help you to change the cursor color of Android EditText View by creating custom XML file under app's drawable folder.
By using following steps you can do it.
Step-1 Create a custom xml file custom_edit_text.xml ...
How to Add Items in Spinner By using SQLite DataBase
In the below example code I have created and example, to add item in Spinner By using SQLite Database. here In activity_main.xml layout I have added EditText, Button and Spinner. Now See programming area, here I have Created a DataBaseHelper Clas...
How to make Custom Spinner using material design
In the below example code I have created a Custom Spinner. Here first, I have added spinner library in build.gradle file. After that, I have added Spinner layout in activity_main.xml layout. In MainActivity I have added items name in String.
Y...
Shake Detector in Android
In Android, the most commonly used sensors are the accelerometer, it is used to measure acceleration. Here it is explained how to detect a shake motion.
Step 1. Create Class ShakeDetector that will extend SensorEventListener:-
Step 1(a) :-&...
How to make Tab Custom Layout?
In the below example code, I have created a Tab Custom Layout. In Tab Layout I have added Text with icon. Here first I have created two custom tab layouts Then I have created a method setupTabIcons() and inflate Custom layouts for tabOne and tabT...
How to use percentage based dimentions in layout?
This tutorial will help you to give percentage based layout width and height. As now the Android have introduce percentage support library. It will helps to run your applications for multiple screen sizes.
So far this support library support f...
Adding Card View Alternatively Within RecyclerView
In the below example code I have Created a RecyclerView. In RecyclerView I have added CardView Item Alternatively like Chat app .
First Item is on left, second is on Right. In Adapter class I have used boolean type, variables(chang...
How to make Horizontal RecyclerView in android?
In the below example I have created a Horizontal RecyclerView.
Here first I have added RecyclerView dependency to Grandle file.
In second step I have added a RecyclerView and Set RecyclerView gravity (center_horizontal). Now see In Main...
How to add icon with text in tab layout
In the below code example I have created a Tab layout, here I have created two methods, first is add text value and second in declare icons.You can see below example code it clearly describes How to add icon with text in tab layout.
...
How to debug Android app wireless
There is some functionality which we cannot test on Android Emulator and Genymotion So we use Android actual device.
But we have to attach device always when we need debug app.
There is very clean and useful Android Studio Plugin which help...
How to create Grid View with in View pager
In the below example I have created a GridView with in Viewpager. Here in activity_main.xml layout , I have added ToolBar, ImageView , TextView, TabLayout, Viewpager. In second step I have created three fragments xml layouts. In fragment_three.xm...
Image Upload using Retrofit
We are assuming you are already familiar with Retrofit. If not then first go to this. We have used multipart request for uploading image on server using Retrofit.
Following are the simple and easy steps for image uploading using Retrofit:-
...
ZoomIn and ZoomOut Animation
Animation is generally used to make user interface more attractive and pleasant.
In android, we can have the animation from many ways.
We call a static function loadAnimation() of the class AnimationUtils. to perform animation in androi...
How to use SmartLock for Passwords in Android
SmartLock for passwords saves your favorites apps and websites accounts authentication to your google account for future use for fast Login.
With SmartLock for passwords you save authentication in Android app may be available on Chrome on Syst...
How to implement Urban Airship api in android to send gcm notifications ?
Urban Airship api provides you better way to implement push notifications and also provide you facility to send messages on production without sending it to live users so you can even test in production phase.
This api supports gcm and amazon ...
Use StackView in Android
StackView is used to display views in StackView. StackView is added from API level 11.
Steps to implement StackView
1. add StackView in layout .
<StackView
android:id="@+id/stackView"
android:la...
How to use EventBus in Android
EventBus is third party library which is best for communication with Activities,Fragment,Thread etc. It simplifies the communication between components. It is fast and less code use.
First of all add dependencies to gradl...
Hot to use action script to call ANE ?
This post is helpful to generate action script to call adobe native extension files. Here we are using FDT IDE used to create Action script for ANE.
1. Download FDT from http://fdt.powerflasher.com/docs/Installing_and_Running_FDT#Standalone_In...
Face Detection Android
From Google Play Services 7.8 Face Detection include in Mobile Vision API. It helps to Detect and track faces from Live Camera or Video.
1. add google gms service dependencies to gradle file.
compile 'com.google.andr...
How to set custom circular reveal effect animation in android?
Hello guys,
In this tutorial I have defined about reveal effect animation and this tutorial will also help you to set custom circular reveal effect animation in your app like whatsapp. First, Lets look what is reveal effect animation and...
Audio Recorder
To record the audio, Android provide a class "MediaRecorder" , you just need to create its instance.
Step 1:-
In your xml, take two buttons to start and stop recording.
Step 2:-
Declare the needed variables
private MediaR...
Android app development for beginners 3: Building a simple Simple User-Interface
In this tutorial you'll learn:
1. How to interact with a simple User-Interface
2. LinearLayout and some basic attributes of the basic UI elements.
How to create floating toolbar in android ?
In this blog we have defined Floating Toolbar which is new component into android with the introduction of material design. Floating Toolbar view just expand after click on Floating Action button with some icons.
With the help of some followin...
Dynamic DataBinding In Android
This Blog simply illustrate how to use dynamic data binding in android
Tired of writing same code again and again for finding views and setting data into it ?
here is a simple solution which will now reduce the developer's effort for do...
How to get images on Canvas from device
Step 1:- Create a custom CanvasView class that must extend View class and includes below function.
1) Declare the required variables in CanvasView class
private Drawable mImage;
// width and height of original image
...
How to use CollapsingToolbar with RecyclerView
In the below example I have created a Collapsing toolbar. When you scoll your recycler items then your header image will hide. Here In actvity_main.xml I have first created CoordinatorLayout as root element, In CoordinatorLayout I have added AppB...
How to generate native jar to build ANE ?
To make a build of ANE i.e Adobe native extension first you have to download FlashRuntimeExtension.jar that comes along with Adobe AIR sdk.
you can download from here :
http://www.adobe.com/devnet/air/air-sdk-download.html
We k...
Introduction of Realm (A replacement of SQLite) for Android
Realm is substitute of SQLite and ORM libraries in your Android application. It is a lightweight database that can replace both SQLite and ORM libraries.
Installation:-
Step 1: Add the following class path dependency to the project ...
Android Material Design Bottom Navigation
This blog will help you to setup a navigation bar at the bottom side of screen in which you can define maximum three to five top level view of an app. These all view can be directly accessed from any where in the app. If we are putting maximum fi...
How to compress video before uploading it to server ?
We know uploading a video on server is a time consuming task but by using third party libraries we can compress video file faster.
There are many libraries available but this one is good, you don't have to add any ndk with this lib :
FF...
Get correct path of file stored in device
Sometimes we faces some problem in getting path of selected files, like till kitkat version we have three types of document storage that are
ExternalStorageProvider
DownloadsProvider
MediaProvider
but in above versions we have
...
Manage image rotation programmatically
Hi we know that we have lots of devices available in Android market with different-2 resolutions and functionalities like we have some issue with samsung and lg devices while capturing images from camera, we basically gets the wrong orientation o...
Tweet from Android application using Fabric
Fabric is Twitter's mobile application development platform. For more about Fabric and install on Android Studio Please refer below link:-
https://get.fabric.io/android
After Install Fabric. Login using Twitter account and...
How to go next Activity click On CardView Item in android
In the below example I have created a RecyclerView, In RecyclerView I have added cardView item, so when you click on cardview item it will open next activity.
In below code, first I have added RecyclerView and CardView library , In second step...
Play Youtube Video in Fragment Using YouTubePlayerFragment
This tutorial explain how we can Play YouTube video within Fragment.
1. Create simple Fragment class extending Fragment.
2. Implement YouTubePlayer.OnInitializedListener to Fragment and override its methods.
3. Create FrameLayout...
How to save Data items in spinner
In the below code I have created a spinner, when you add your name or text in edit text box and press Add Button your text data will be save on Spinner. Here first I have added a EditText, Button and Spinner with in activity_main.xml layout...
How to remove ListView Item dynamically using animation function in android?
In the below example I have created a ListView , when user touch ListView row item then that particular row item will be remove dynamically. Here, first I have added Listview in activity_main.xml layout. In next step I have created row.xml layout...
How to add swipe gestures in ListView item
In the below example , I have added swipe gestures on ListView. When you swipe particular ListItem in ListView then swipe gestures will perform. Here first I have added ListView in actvity_main.xml layout. In second step I have created...
How can use Bitmap in android
In the below exampl e I have added a image with the help of Bitmap. Bitmap is eventually created and displayed on the screen. By using simply bitmap a pixels of rectangle, each pixel can be set to a given color but exactly what co...
How to create muliple fragment image display in common Frame
In the below example I have created a multiple fragment images use in common Frame .
In first step, First I have created a fragment_common.xml layout , here I have added four ImageView. After then I have created four new xml layout -...
How to make ListView fragment in android
In the below example code I have created a ListView fragment app. In first step, first I have created list_fragment.xml layout here I have added a ListView and TextView. In Step second, I have added a fragment in actvity_main.xml layout and then ...
How to create Frame animation in android
In the below example code. I have created Frame animation in android. Here I have created a Textview in activity_main.xml layout. After then I have created a new framanim.xml layout in drawable folder, In framanim.xml layout I have added fo...
How to make CustomDialog Fragment in android
In the below example code I have created a CustomDialog Fragment. Here, first I have created custom_dialog.xml layout , On this xml layout I have added EditText and Button. In next step, in activity_main.xml layout I have added a Button and...
How to create fragment In android
In the below example I have created a simple fragment app code. Here, first I have created two new fragment xml layouts and neamed them fragmentone and fragmenttwo then in this I have added TextView and backgraund image. Now In activity_main.xml ...