In this article, we will learn the easiest way to load Gif Images in ImageView in Android. We will use Glide Image loading & caching library to load Gif in Android. As we all now that directly we cannot load a Gif image in ImageView in Android. So mostly it’s suggested to use Webview to […]
How to Change Tint Color for an Image in Android
In this article, we will discuss how to change Tint Color for an Image in Android programmatically as well as in XML. Tint color means when we want to change the color of the image while rendering in ImageView. In XML is very easy to change tint color by just setting up the attribute android:tint=”” […]
Convert Bitmap to File in Android – JAVA & Kotlin
It’s a common requirement in Android Apps to save images as files in external storage and get a File reference from that saved location. Usually, we have images in the form of Bitmap in Android. In the following article, we will discuss how to Convert Bitmap to File in Android in both Java & Kotlin. […]
Capitalize First Letter of String in Android – Kotlin & Java
If we have a String in Kotlin or in Java in Android and we need to capitalize the first letter of the string, we don’t have any built-in method for the purpose. You can use the following methods to capitalize the first letter of String in Android in both Java & Kotlin. Capitalize First Letter […]
Get File Path From URI in Android JAVA
In Android when we pick an image, video, or any other type of file from the gallery, documents folder, or capture directly from the camera, we receive a URI object in intent. We have different ways to get a full file path from URI based on content providers. In this article, we will discuss how […]
Find Distance between 2 locations in JAVA & SWIFT
Sometimes we have to calculate the distance between 2 locations when we have coordinates latitude and longitude for those locations. This article will discuss how you can calculate a straight line distance between 2 locations 2 programming languages, JAVA & Swift. 1. Code to Find Distance in JAVA In JAVA we don’t have any builtin […]
How to Save and Load Bitmap from Cache using LruCache in Java Android
During mobile Apps development, it’s a good practice to save images in the cache for next time fast loading. Most of the time we use Image caching libraries like Fresco, Picasso, or Glide for caching when we load images from a remote URL. But we can also use Android’s native LruChache class for this purpose. […]
Pass Object from One Activity to Another using Serializable in Android – Java
Serializable is a Java Interface through which we can convert a class object into a byte stream. We can pass object from one activity to another using Serializable in Android. Although it is considered a slow method to pass data between activities as compare to Parcelable but it’s easiest to implement. In the following example, […]
Basic RecyclerView Custom Adapter in Java Android
RecyclerView is a UI component in Android to show lists & grid of items. we usually write the RecyclerView Custom Adapter to populate data to each item of the list. In the following code, I have shared a basic RecyclerView custom adapter in Java. You can just copy-paste this code in your project and modify it […]
Lint found fatal errors while assembling a release target Android
I recently found that people are struggling while generating a release APK from Android studio with the error, “Lint found fatal errors while assembling a release target”. Although their App is running successfully in Debug mode. This error happens when we have some issues in some XML files or some other issue not allowing the […]