77 alt="Android" />
88 </a >
99
10- <a href =" https://developer.android.com/about/versions/android-4 .0.html " >
11- <img src="https://img.shields.io/badge/MinSdk-17 -blue.svg"
10+ <a href =" https://developer.android.com/about/versions/android-5 .0.html " >
11+ <img src="https://img.shields.io/badge/MinSdk-21 -blue.svg"
1212 alt="MinSDK" />
1313 </a >
1414
3333
3434<p align =" center " ><img src =" apk/preview/app_icon_demo.jpg " width =" 620 " /> </p >
3535
36- ## Download Demo App
36+ # Download Demo App
3737
3838Download the demo app <code ><b >.apk</b ></code > file here
3939
4040<a href =" apk/BlurShadow.apk " >
4141<img src="apk/preview/app_icon_demo_app.png" width="280"
4242 alt="Demo App" /></a >
4343
44- ## Scan to Download
44+ # Scan to Download
4545<img src =" apk/app_barcode.PNG " width =" 180 " alt =" Demo App " />
4646
4747
48- ## Installation
48+ # Installation
4949Add it in your root build.gradle at the end of repositories :
5050``` js
5151allprojects {
@@ -64,22 +64,24 @@ dependencies {
6464 ```
6565
6666
67- ## How to use
68- ### Using Xml to config
67+ # How to use
68+ ## Using Xml to config
69+
6970``` xml
7071
7172 <me .virtualiz.blurshadowimageview.BlurShadowImageView
72- android : layout_width =" 200dp"
73- android : layout_height =" 220dp"
74- android : layout_gravity =" center"
75- app : v_shadowOffset =" 40dp"
76- app : v_imageRound =" 20dp"
77- app : v_imageSrc =" @drawable/nature" />
73+ android:layout_width=" 200dp"
74+ android:layout_height=" 220dp"
75+ android:layout_gravity=" center"
76+ app:v_shadowOffset=" 40dp"
77+ app:v_imageRound=" 20dp"
78+ app:v_imageSrc=" @drawable/nature" />
79+
7880```
7981
80- ### Use Java code to config
82+ ## Use Java code to config
8183``` js
82- BlurShadowImageView blurshadowimageview = (BlurShadowImageView) findViewById (R .id .blurSImageView );
84+ BlurShadowImageView blurshadowimageview = findViewById (R .id .blurSImageView );
8385
8486// Sets Border Round Radius
8587blurshadowimageview .setRound ((int) value);
@@ -96,43 +98,45 @@ blurshadowimageview.setImageBitmap(bitmap);
9698```
9799
98100
99- ## Load image with Picasso
101+ # Load image with Picasso
100102
101103<img align =" right " src =" apk/preview/app_load_online.gif " width =" 280 " />
102104
103105
104106``` js
105- Picasso .with (getBaseContext ())
106- .load (" https://i.imgur.com/DvpvklR.png" )
107- .into (new Target () {
108- @Override
109- public void onBitmapLoaded (Bitmap bitmap , Picasso .LoadedFrom loadedFrom ) {
110- demo_img .setImageBitmap (bitmap);
111- }
112-
113- @Override
114- public void onBitmapFailed (Drawable drawable ) {
115- // on failed do something
116- }
117-
118- @Override
119- public void onPrepareLoad (Drawable drawable ) {
120- // on prepare loading do something
121- }
122- });
107+ Target target = new Target () {
108+ @Override
109+ public void onBitmapLoaded (Bitmap bitmap,
110+ Picasso .LoadedFrom from) {
111+ // Bitmap is loaded, use Image here
112+ demo_img .setImageBitmap (bitmap);
113+ }
114+ @Override
115+ public void onBitmapFailed (Exception e , Drawable d ) {
116+ // Fires if bitmap couldn't be loaded.
117+ }
118+ @Override
119+ public void onPrepareLoad (Drawable d ){
120+ // Fires bitmap on prepare.
121+ }
122+ };
123+ // Use this target for the Picasso.into() method
124+
125+ Picasso .get ().load (" https://i.imgur.com/DvpvklR.png" ).into (target);
126+
123127```
124128
125129
126130
127- ## Image Blur Backdrop Offset
131+ # Image Blur Backdrop Offset
128132
129133<img src =" apk/preview/app_preview_offset.jpg " width =" 650 " />
130134
131135```
132136```
133137
134138
135- ## Documentation
139+ # Documentation
136140
137141 | Name| Format| Default| Details|
138142 | :---:| :---:| :---:| :---:|
@@ -141,10 +145,14 @@ blurshadowimageview.setImageBitmap(bitmap);
141145 | app: v_shadowOffset | dimension| 40dp| configure the distance between the Image and the Shadow|
142146
143147
144- ## Find this library useful? :heart :
145- Support it by joining [ stargazers] ( https://github.com/virtualvivek/BlurShadowImageView/stargazers ) for this repository. :star :
148+ # Find this library useful? :heart :
149+ Support it by joining [ stargazers] ( https://github.com/virtualvivek/BlurShadowImageView/stargazers ) for this repository. :star :
150+
151+ # Branches
152+ Branch -version 2.x [ <b >AndroidX</b > ] Current <a href =" https://github.com/virtualvivek/BlurShadowImageView/tree/master " >View Branch</a ><br />
153+ Branch -version 1.x <b >Support Library</b > <a href =" https://github.com/virtualvivek/BlurShadowImageView/tree/supportLibrary " >View Branch</a >
146154
147- ## License
155+ # License
148156
149157BlurShadowImageView is licensed under ` MIT license ` . View [ license] ( https://github.com/virtualvivek/BlurShadowImageView/blob/master/LICENSE ) .<br >
150158Copyright (c) 2020-21 ` Vivek Verma `
0 commit comments