Shadow and Text on ImageView in Android

In this article, we will learn how to create a shadow on ImageView in Android. This article is the part of the Today I Learnt category.

Here is the video tutorial

So let’s started.

Let me tell you about its usage. Basically it is mostly used in e-commerce Applications.

Now, let’s understand the structure of this. Basically, it is working like a stack where every view stacked over one another.

Create a drawable file for shadow view and assign name as image_shadow and add below code in this file.

Now, goto xml file and add the below code into it and set this drawable file as view’s background.

Note: Follow this code line by line.

In this code, I had set components’ constraints like a stack where every component stacked with each other.

Cheeeerrrsss 🍷 , That’s all for now.

Thanks for reading if you want any help then connect with on my Blog, Github, Twitter.

Software Engineer => Android and Flutter Dev