Skip to main content

Posts

Showing posts from June, 2020

Skeleton content loading animation in android | Facebook Shimmer

What is Facebook Shimmer Today we are going to see what is Facebook shimmer and how to use it?
See below example to understand Facebook shimmer.

The Facebook shimmer is used to show or indicate the user that the content is loading from somewhere which takes sometimes so that users need to wait. While content is loading, it is necessary to show the user an indication that content is loading and it is bad practice to leave screen blank which confuses user what is happening in the app or maybe the user thinks the app is hanging. How to use Facebook Shimmer So enough talking, let do some code on how to make content loading animation using facebook shimmer library. See below facebook shimmer android example To use facebook shimmer first we need to add the dependency to your project. See below to add facebook shimmer dependency. After adding dependency, let's create our layout. For demo purposes, we are creating our layout some like bel…

What is RecyclerView in Android?

RecyclerView in Android Hello world, today we are going to learn what is recyclerview, what are its advantages, and what are recyclerview examples? Let's start...
What is RecyclerView? RecyclerView helps us to make a repetitive and group of views. It can be a list of views in the form of a list view or in the gird type of view. Think it about as a loop of views where you can populate your data dynamically in the child's views. Recyclerview can be used as a listview of textview but with different text. You can also use cardview with recyclerview to make your UI look professional.
Check this tutorial on how to make simple recyclerview using cardview?
According to the android official site, what is recyclerview?
The RecyclerView widget is a more advanced and flexible version of ListView.
In the RecyclerView model, several different components work together to display your data. The overall container for your user interface is a RecyclerView o…

Recyclerview and Cardview example in Android [Beginner Level]

Working with Recyclerview and Cardview

Hello World, Today we are going to see how we can make a simple recyclerview with cardview in android studio. In this article, you will learn how to work with recyclerview, what is recyclerview layoutmanager? See the below gif for understanding what we are going to build.


Let's start...
What is Recyclerview in Android? Recyclerview is an advanced version of the listview. It is used to make the repeated view and recycle them to save more memory. Recyclerview is way more efficient than listview. Recyclerview easily handles a large set of views and is very flexible. Recyclerview is like a container that renders a large set of views very efficient manner. Recyclerview is optimized to work with a large number of views and save lots of memory so that your app will freeze or hang the device.
According to the official android site:
The RecyclerView widget is a more advanced and flexible version of ListView.
In the RecyclerView model, …

Save Image to storage using Glide in Android

Save Image using Glide
Hello World, Today we are going to see how we can save the image using the Glide library. Sometimes we are already using glide dependency in our android project to load images from link and we want to download the same image in the android device. In that case, we can utilize glide to save that bitmap to our android storage. Continue reading on this article to see how to download images using glide dependency.
Glide Download Image to File Before we go deep in, I want you to read first how to load image from URL using glide. In that article, I have explained how you can use glide in your project. 
Okay, now I am assuming that you know how to use glide to load image from URL.
I have made this layout to make it easy to understand all the things.


In the above layout, it is self-explanatory but let me explain here is an imageview with a button to download the image on click.
Let's see the logic behind the click button. Check the below c…

Customize rating bar in android

Custom Rating Bar in Android

Hello World, Today we are going to see how to customize rating bar in android for example:  how to make small rating bar or how to change the color of rating bar or how to completely change rating bar appearance and set rating change listener etc.
How to change rating bar size or make rating bar small Making a small rating bar is simple but before making a small rating bar, let's look at how the default rating bar looks if we add it in our layout?


The default rating bar is big and looks ugly, to make it look small and make stars color golden or yellow we use below code:


Now, this looks perfect, right? But wait what if I tell you that you can use any image instead of stars in the rating bar? excited! Stay with this article and you will catch it later.
Now let's see how we can add a listener to the rating bar do that whenever a user give rating we can at accordingly.
Set Listener for Rating bar To add a rating change…

What is CardView in Android?

CardView in Android
Hello World, Today we are going to see what is cardview in android and what it's advantages. 
CardView is a widget provided by the android to build a new look and efficient UI. You can make your app look more professional see examples below. Cardview is an amazing concept which makes your user experience better than old android UI. Cardview was released with Android version 5.0 which is android lollipop.
According to Android's Official Site, what is cardview:
CardView API as an easy way for you to show information inside cards that have a consistent look across the platform. These cards have a default elevation above their containing view group, so the system draws shadows below them. Cards provide an easy way to contain a group of views while providing a consistent style for the container.
What are the advantages of CardView?
Before the cardview, if we want to make something look like a card we mostly use framelayout b…