Android studio Gradle build speed is slow

On triggering Clean–>Rebuild in Android studio, the gradle build system downloads the latest Jar or Lib files from internet, downloading these files based on internet speed. If you enable below options, the gradle reuse the cached jar or lib always & works offline. Update: Simply upgrade to SSD for faster performance, here my new post about how i …

BigPictureStyle Notification in Android Example

In the previous post we have learnt on how to show notifications in Android, now we shall see how to show Large icon in notification bar. This style of notifications are called as BigPicturestyle Notifications. For example so many apps like, Flipkart, Mobikwik, Paytm etc… they randomly post big picture notifications, the image consists of brief …

Collapsing Toolbars Android Example

CollapsingToolbarLayout is the newly introduced in Lollipop. Whenever user scrolls up, this control will provide animating effect. With help of Design Library we can provide same animation effect from Android 2.1 onward devices. We can wrap ImageView & Toolbar as child of CollapsingToolbarLayout, whenever scroll event occurs the wrapped toolbar goes up & image gets diminished, pinned at …

Create Lollipop Tabs in Android Example.

To create Lollipop style of tab for all the version of Android from 2.1 onward just follow steps given in this example, here we shall see setting up of tabs with simple Listview. In our previous example of Appbar in Android, there we had used recycleview but here we are using the simple listview. Update Gradle with below dependency’s compile ‘com.android.support:design:22.2.0’ …

Android AppBarLayout Scrolling Example

Like whatsapp, on scrolling of listview, automatically toolbar gets hidden. This can be achieved using the Android AppBarLayout, Use this layout to hide the actionbar or appbar when the sibling view is scrolled. AppBarLayout is introduced from Lollipop onwards, but  through design support library you can add this feature for Android 2.1 or above devices. Above image is an example of …

Snackbar Android Example Using Design Support Library

Snackbar is the best replacement for toast messages & you can set actions in the form of pop up. Most of the lollipop material design apps uses snack bar. To use this functionality for all the versions of Android from 2.1 onward, update design library  dependency in gradle file. dependencies { compile fileTree(dir: ‘libs’, include: [‘*.jar’]) …

FloatingActionButton Android Using Support Library Example

Google has introduced a support library through which Android FloatingActionButton can be added from 2.1 version onward.   Add the support design library as dependency in gradle file. dependencies { compile fileTree(dir: ‘libs’, include: [‘*.jar’]) compile ‘com.android.support:appcompat-v7:22.2.0’ compile ‘com.android.support:design:22.2.0’ } FloatingActionButton is extended from imageview & the behavior is similar to normal button. For eg, <android.support.design.widget.FloatingActionButton …

TextInputLayout Android Example

TextinputLayout is introduced recently from Lollipop onwards, however through support library it is supported to all the versions of Android from 2.1. The advantages of Text input Layout is simple, it gives animating effect of hint text on entering the details in edittext, set the error just below the edit box. 1) Add the support …