A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows

Overview

Android MinSDK JitPack Codacy Badge Library Size

This library provides blurred drop shadows to ImageView similar to iOS backdrop shadows.Provides fast canvas draw as no renderscript needed .The similar shadow blurred effects can also be seen in iOS Music App.

Download Demo App

Download the demo app .apk file here

Demo App

Scan to Download

Demo App

Installation

Add it in your root build.gradle at the end of repositories :

 allprojects {
     repositories {
         ...
	 maven { url 'https://jitpack.io' }
	  }
	}

Add the following dependency to your app build.gradle file :

 dependencies {
     implementation 'com.github.virtualvivek:BlurShadowImageView:4.0'
	}

How to use

Using Xml to config

">
 <me.virtualiz.blurshadowimageview.BlurShadowImageView
     android:layout_width="200dp"
     android:layout_height="200dp"
     android:layout_gravity="center"
     android:scaleType="centerCrop"
     app:v_shadowOffset="40dp"
     app:v_imageRound="20dp"
     app:v_imageSrc="@drawable/nature" />

Use Java code to config

BlurShadowImageView blurshadowimageview = findViewById(R.id.blurSImageView);

//Sets Border Round Radius
blurshadowimageview.setRound((int) value);

//Sets Image Resource
blurshadowimageview.setImageResource(ImgRes);

//Sets Image Drawable
blurshadowimageview.setImageDrawable(drawable);

//Sets Image Bitmap
blurshadowimageview.setImageBitmap(bitmap);

Load image with Picasso

 Target target = new Target() {
	@Override
    	public void onBitmapLoaded(Bitmap bitmap,
		Picasso.LoadedFrom from) {
		// Bitmap is loaded, use Image here
		demo_img.setImageBitmap(bitmap);
    	}
    	@Override
    	public void onBitmapFailed(Exception e, Drawable d) {
		// Fires if bitmap couldn't be loaded.
    	}
    	@Override
    	public void onPrepareLoad(Drawable d){
		// Fires bitmap on prepare.
    	}
};

//Use this target for the Picasso.into() method
Picasso.get().load("https://i.imgur.com/DvpvklR.png").into(target);
			

Image Blur Backdrop Offset

Documentation

app:v_imageSrc: "../refrence"
app:v_imageRound: "(int)dp"
app:v_shadowOffset: "(int)dp"
android:scaleType: ["center","centerCrop","fitEnd","fitCenter","fitXY","centerInside","fitStart","matrix"]
Name Format Default Details
app:v_imageSrc reference image sets image to the ImageView
app:v_imageRound dimension 10dp sets border radius to the ImageView
app:v_shadowOffset dimension 40dp configure the distance between the Image and the Shadow
android:scaleType string "centerCrop" configure the Image scaling

Find this library useful? ❤️

Support it by joining stargazers for this repository.

Branches

Branch -version 4.x [ AndroidX ] Current Branch
Branch -version 1.x Support Library View Branch

License

BlurShadowImageView is licensed under MIT license. View license.
Copyright (c) 2020-21 Vivek Verma

You might also like...
A circular ImageView for Android
A circular ImageView for Android

CircleImageView A fast circular ImageView perfect for profile images. This is based on RoundedImageView from Vince Mi which itself is based on techniq

Adds touch functionality to Android ImageView.

TouchImageView for Android Capabilities TouchImageView extends ImageView and supports all of ImageView’s functionality. In addition, TouchImageView ad

Custom shaped android imageview components
Custom shaped android imageview components

Shape Image View Provides a set of custom shaped android imageview components, and a framework to define more shapes. Implements both shader and bitma

Android ImageView widget with zoom and pan capabilities

ImageViewTouch for Android ImageViewTouch is an android ImageView widget with zoom and pan capabilities. This is an implementation of the ImageView wi

Implements pinch-zoom, rotate, pan as an ImageView for Android 2.1+

GestureImageView This is a simple Android View class which provides basic pinch and zoom capability for images. Can be used as a replacement for a sta

Android ImageView that handles animated GIF images
Android ImageView that handles animated GIF images

GifImageView Android ImageView that handles Animated GIF images Usage In your build.gradle file: dependencies { compile 'com.felipecsl:gifimageview:

Android ImageView that supports different radii on each corner.
Android ImageView that supports different radii on each corner.

SelectableRoundedImageView Note that this project is no longer maintained. Android ImageView that supports different radii on each corner. It also sup

ImageView with a tag on android
ImageView with a tag on android

SimpleTagImageView ImageView with a tag in android. So it's a ImageView. Demo ####Warning:When you set the round radius,the simpletagimageview scale t

Create parallax and any other transformation effects on scrolling android ImageView
Create parallax and any other transformation effects on scrolling android ImageView

Android Parallax Image View Creates effect such as vertical parallax, horizontal parallax etc. on android ImageView when it's being vertically or hori

Comments
  • Online images not scaling well

    Online images not scaling well

    Online images loaded buy Picasso/Glide rendered incorrectly.

    API LEVEL 30 REPRODUCTION.

    Using the demo app i resized the ImageView to fill the width and have height same as width. After clicking "Load Online Image" button, the image is not scaling to fit the new width and height.

    Screenshot shows local image scaling well:

    Screenshot_Before


    Screenshot when loading online image:


    Screenshot_after

    bug good first issue 
    opened by mkevin1993 19
Releases(4.0)
  • 4.0(Sep 1, 2021)

    Release -v4.0

    Changelog -

    • Fixed Online Image Scaling on newer devices see > #3
    • Improved Rendering for isInEditMode() for better IDE experiance.
    Source code(tar.gz)
    Source code(zip)
  • 2.1(Apr 12, 2021)

  • 2.0(Apr 10, 2021)

    BlurShadowImageView -v2.0

    Migrated to androidX

    ChangeLog

    • androidx full support (master branch).
    • picasso library implementaion updated.
    • fixed isEditMode on Android Studio, now has a better editor preview.
    • performance improvement.
    Source code(tar.gz)
    Source code(zip)
  • 1.2(Jul 27, 2020)

    BlurShadowImageView -v1.2 ChangeLog

    • bug fixes on image rendering on high resolution devices,
    • enhanced blurring technique with better blur rendering on high end devices,
    • now supports Picasso,Glide and UniversalImageLoader,
    • customize blur shadow offset from the image easily.
    Source code(tar.gz)
    Source code(zip)
  • 1.12(Mar 14, 2020)

    Release ( BlurShadowImageView : [ -v 1.12 ] ) is a stable version with complete documentation and files.

    • Removed unused dependencies
    • Minimized Size of Code
    Source code(tar.gz)
    Source code(zip)
  • 1.1(Feb 23, 2020)

Owner
Vivek Verma
Programmer, Artist, Beautifying UI World.
Vivek Verma
Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻

BigImageViewer Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling

Piasy 3.9k Dec 30, 2022
Android ImageView replacement which allows image loading from URLs or contact address book, with caching

Smart Image View for Android SmartImageView is a drop-in replacement for Android’s standard ImageView which additionally allows images to be loaded fr

James Smith 1.3k Dec 24, 2022
Custom ImageView for moving image around the screen (Android)

MovingImageView Create a custom ImageView for moving image around the screen. Usage To use MovingImageView, add the module into your project and start

Albert Grobas 819 Nov 18, 2022
Flickable ImageView for Android. It's like a view of twitter's detail image.

FlickableView Flickable ImageView for Android. It's like a view of twitter's detail image. It's possible that other views animate with FlickableView.

goka 153 Nov 14, 2022
Custom ImageView to generate captcha image.

CaptchaImageView Custom ImageView to generate captcha image. Add CaptchaImageView to your layout <test.jinesh.captchaimageviewlib.CaptchaImageView

Jinesh Francis 610 Oct 18, 2022
Image Picker with Customizable UI for Android, Pick an image from Gallery

Image Picker A Image Picker Library for Android (Supports Android 12) with fully

null 2 May 29, 2022
Slider-Gallery-Zoom: image slider for android supporting indicator and auto scroll with clicking on image

image slider supporting indicator and auto scroll with clicking on image to open full screen image slider swipe and pinch zoom gestures like gallery,just pass your images and the position of the current image.

Mahmoud Elian 3 May 28, 2022
Custom ImageView for android with polygon shape (Android)

PolygonImageView Create a custom ImageView with polygonal forms. Usage To use PolygonImageView, add the module into your project and start to build xm

Albert Grobas 531 Dec 25, 2022
Implementation of ImageView for Android that supports zooming, by various touch gestures.

PhotoView PhotoView aims to help produce an easily usable implementation of a zooming Android ImageView. [ Dependency Add this in your root build.grad

Baseflow 18.4k Dec 30, 2022