├── .gitattributes
├── .gradle
├── 5.6.4
│ ├── executionHistory
│ │ ├── executionHistory.bin
│ │ └── executionHistory.lock
│ ├── fileChanges
│ │ └── last-build.bin
│ ├── fileContent
│ │ └── fileContent.lock
│ ├── fileHashes
│ │ ├── fileHashes.bin
│ │ ├── fileHashes.lock
│ │ └── resourceHashesCache.bin
│ ├── gc.properties
│ └── javaCompile
│ │ ├── classAnalysis.bin
│ │ ├── jarAnalysis.bin
│ │ ├── javaCompile.lock
│ │ └── taskHistory.bin
├── buildOutputCleanup
│ ├── buildOutputCleanup.lock
│ ├── cache.properties
│ └── outputFiles.bin
└── vcs-1
│ └── gc.properties
├── .idea
├── caches
│ └── build_file_checksums.ser
├── codeStyles
│ └── Project.xml
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── gradle.xml
├── libraries
│ ├── Gradle__androidx_activity_activity_1_0_0_aar.xml
│ ├── Gradle__androidx_annotation_annotation_1_1_0_jar.xml
│ ├── Gradle__androidx_annotation_annotation_experimental_1_0_0_aar.xml
│ ├── Gradle__androidx_appcompat_appcompat_1_2_0_aar.xml
│ ├── Gradle__androidx_appcompat_appcompat_resources_1_2_0_aar.xml
│ ├── Gradle__androidx_arch_core_core_common_2_1_0_jar.xml
│ ├── Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml
│ ├── Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml
│ ├── Gradle__androidx_cardview_cardview_1_0_0_aar.xml
│ ├── Gradle__androidx_collection_collection_1_1_0_jar.xml
│ ├── Gradle__androidx_constraintlayout_constraintlayout_2_0_1_aar.xml
│ ├── Gradle__androidx_constraintlayout_constraintlayout_solver_2_0_1_jar.xml
│ ├── Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml
│ ├── Gradle__androidx_core_core_1_3_0_aar.xml
│ ├── Gradle__androidx_core_core_1_3_1_aar.xml
│ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml
│ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml
│ ├── Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml
│ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_exifinterface_exifinterface_1_0_0_aar.xml
│ ├── Gradle__androidx_fragment_fragment_1_1_0_aar.xml
│ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml
│ ├── Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml
│ ├── Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml
│ ├── Gradle__androidx_legacy_legacy_support_v4_1_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml
│ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml
│ ├── Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml
│ ├── Gradle__androidx_media_media_1_0_0_aar.xml
│ ├── Gradle__androidx_print_print_1_0_0_aar.xml
│ ├── Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml
│ ├── Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml
│ ├── Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml
│ ├── Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_test_core_1_3_0_aar.xml
│ ├── Gradle__androidx_test_espresso_espresso_core_3_3_0_aar.xml
│ ├── Gradle__androidx_test_espresso_espresso_idling_resource_3_3_0_aar.xml
│ ├── Gradle__androidx_test_ext_junit_1_1_2_aar.xml
│ ├── Gradle__androidx_test_monitor_1_3_0_aar.xml
│ ├── Gradle__androidx_test_runner_1_3_0_aar.xml
│ ├── Gradle__androidx_transition_transition_1_2_0_aar.xml
│ ├── Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml
│ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml
│ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml
│ ├── Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml
│ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml
│ ├── Gradle__com_google_android_material_material_1_2_0_aar.xml
│ ├── Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml
│ ├── Gradle__com_squareup_javawriter_2_1_1_jar.xml
│ ├── Gradle__com_squareup_okhttp3_okhttp_3_10_0_jar.xml
│ ├── Gradle__com_squareup_okio_okio_1_14_0_jar.xml
│ ├── Gradle__com_squareup_picasso_picasso_2_71828_aar.xml
│ ├── Gradle__javax_inject_javax_inject_1_jar.xml
│ ├── Gradle__junit_junit_4_12_jar.xml
│ ├── Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
│ ├── Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
│ └── Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
├── vcs.xml
└── workspace.xml
├── BlurShadowImageView.iml
├── LICENSE
├── README.md
├── apk
├── BlurShadow.apk
├── BlurShadow_v1_branch.apk
├── app_barcode.PNG
└── preview
│ ├── app_icon_demo.jpg
│ ├── app_icon_demo.png
│ ├── app_icon_demo_app.png
│ ├── app_icon_title.jpg
│ ├── app_icon_title.png
│ ├── app_load_online.gif
│ ├── app_preview_offset-max.png
│ ├── app_preview_offset.jpg
│ └── app_preview_offset.png
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── me
│ │ └── virtualiz
│ │ └── blurshadowimageviewEx
│ │ └── MainActivity.java
│ └── res
│ ├── drawable
│ ├── background_green_round_touchlistner.xml
│ ├── background_green_round_touchlistner_presses.xml
│ ├── background_green_round_touchlistner_selector.xml
│ ├── background_white_round_touchlistner.xml
│ ├── background_white_round_touchlistner_presses.xml
│ ├── background_white_round_touchlistner_selector.xml
│ ├── github.xml
│ ├── ironman.png
│ ├── ironman_80.png
│ ├── lambo.png
│ ├── nature.png
│ ├── product_garments.png
│ └── product_shoes.png
│ ├── layout
│ └── activity_main.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ └── values
│ ├── colors.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── library
├── .gitignore
├── build.gradle
├── library.iml
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── me
│ │ └── virtualiz
│ │ └── blurshadowimageview
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── me
│ │ │ └── virtualiz
│ │ │ └── blurshadowimageview
│ │ │ ├── BlurShadowImageView.java
│ │ │ └── helper
│ │ │ ├── FadingImageView.java
│ │ │ └── RoundImageView.java
│ └── res
│ │ └── values
│ │ ├── attr.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── me
│ └── virtualiz
│ └── blurshadowimageview
│ └── ExampleUnitTest.java
├── local.properties
└── settings.gradle
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for gitattributes
5 |
6 |
--------------------------------------------------------------------------------
/.gradle/5.6.4/executionHistory/executionHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/executionHistory/executionHistory.bin
--------------------------------------------------------------------------------
/.gradle/5.6.4/executionHistory/executionHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/executionHistory/executionHistory.lock
--------------------------------------------------------------------------------
/.gradle/5.6.4/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/5.6.4/fileContent/fileContent.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/fileContent/fileContent.lock
--------------------------------------------------------------------------------
/.gradle/5.6.4/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/.gradle/5.6.4/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/.gradle/5.6.4/fileHashes/resourceHashesCache.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/fileHashes/resourceHashesCache.bin
--------------------------------------------------------------------------------
/.gradle/5.6.4/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/gc.properties
--------------------------------------------------------------------------------
/.gradle/5.6.4/javaCompile/classAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/javaCompile/classAnalysis.bin
--------------------------------------------------------------------------------
/.gradle/5.6.4/javaCompile/jarAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/javaCompile/jarAnalysis.bin
--------------------------------------------------------------------------------
/.gradle/5.6.4/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/.gradle/5.6.4/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/5.6.4/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Sat Apr 10 01:28:44 IST 2021
2 | gradle.version=5.6.4
3 |
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/outputFiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/buildOutputCleanup/outputFiles.bin
--------------------------------------------------------------------------------
/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.gradle/vcs-1/gc.properties
--------------------------------------------------------------------------------
/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | xmlns:android
14 |
15 | ^$
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | xmlns:.*
25 |
26 | ^$
27 |
28 |
29 | BY_NAME
30 |
31 |
32 |
33 |
34 |
35 |
36 | .*:id
37 |
38 | http://schemas.android.com/apk/res/android
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | .*:name
48 |
49 | http://schemas.android.com/apk/res/android
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | name
59 |
60 | ^$
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | style
70 |
71 | ^$
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | .*
81 |
82 | ^$
83 |
84 |
85 | BY_NAME
86 |
87 |
88 |
89 |
90 |
91 |
92 | .*
93 |
94 | http://schemas.android.com/apk/res/android
95 |
96 |
97 | ANDROID_ATTRIBUTE_ORDER
98 |
99 |
100 |
101 |
102 |
103 |
104 | .*
105 |
106 | .*
107 |
108 |
109 | BY_NAME
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_collection_collection_1_1_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_2_0_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_2_0_1_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_core_core_1_3_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_core_core_1_3_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_exifinterface_exifinterface_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_legacy_legacy_support_v4_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_media_media_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_core_1_3_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_3_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_3_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_2_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_monitor_1_3_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_runner_1_3_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_transition_transition_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_viewpager2_viewpager2_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_google_android_material_material_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_10_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_squareup_okio_okio_1_14_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_squareup_picasso_picasso_2_71828_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__junit_junit_4_12_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 | 1575278411678
217 |
218 |
219 | 1575278411678
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
--------------------------------------------------------------------------------
/BlurShadowImageView.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Vivek Verma
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 |
10 |
11 |
13 |
14 |
15 |
16 |
18 |
19 |
20 |
21 |
23 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
32 |
33 | 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.
34 |
35 |
36 |
37 | # Download Demo App
38 |
39 | Download the demo app .apk
file here
40 |
41 |
42 |
44 |
45 | ## Scan to Download
46 |
47 |
48 |
49 | # Installation
50 | Add it in your root build.gradle at the end of repositories :
51 | ```gradle
52 | allprojects {
53 | repositories {
54 | ...
55 | maven { url 'https://jitpack.io' }
56 | }
57 | }
58 | ```
59 |
60 | Add the following dependency to your app build.gradle file :
61 | ```gradle
62 | dependencies {
63 | implementation 'com.github.virtualvivek:BlurShadowImageView:4.0'
64 | }
65 | ```
66 |
67 | # How to use
68 | ## Using Xml to config
69 |
70 | ```xml
71 |
79 | ```
80 |
81 | ## Use Java code to config
82 | ```js
83 | BlurShadowImageView blurshadowimageview = findViewById(R.id.blurSImageView);
84 |
85 | //Sets Border Round Radius
86 | blurshadowimageview.setRound((int) value);
87 |
88 | //Sets Image Resource
89 | blurshadowimageview.setImageResource(ImgRes);
90 |
91 | //Sets Image Drawable
92 | blurshadowimageview.setImageDrawable(drawable);
93 |
94 | //Sets Image Bitmap
95 | blurshadowimageview.setImageBitmap(bitmap);
96 |
97 | ```
98 |
99 | # Load image with Picasso
100 |
101 |
102 |
103 |
104 | ```js
105 | Target target = new Target() {
106 | @Override
107 | public void onBitmapLoaded(Bitmap bitmap,
108 | Picasso.LoadedFrom from) {
109 | // Bitmap is loaded, use Image here
110 | demo_img.setImageBitmap(bitmap);
111 | }
112 | @Override
113 | public void onBitmapFailed(Exception e, Drawable d) {
114 | // Fires if bitmap couldn't be loaded.
115 | }
116 | @Override
117 | public void onPrepareLoad(Drawable d){
118 | // Fires bitmap on prepare.
119 | }
120 | };
121 |
122 | //Use this target for the Picasso.into() method
123 | Picasso.get().load("https://i.imgur.com/DvpvklR.png").into(target);
124 |
125 | ```
126 |
127 |
128 | # Image Blur Backdrop Offset
129 |
130 |
131 |
132 |
133 |
134 | # Documentation
135 |
136 | ```yaml
137 | app:v_imageSrc: "../refrence"
138 | ```
139 | ```yaml
140 | app:v_imageRound: "(int)dp"
141 | ```
142 | ```yaml
143 | app:v_shadowOffset: "(int)dp"
144 | ```
145 | ```yaml
146 | android:scaleType: ["center","centerCrop","fitEnd","fitCenter","fitXY","centerInside","fitStart","matrix"]
147 | ```
148 |
149 | |Name|Format|Default|Details|
150 | |:---:|:---:|:---:|:---:|
151 | |app:v_imageSrc |reference|image|sets image to the ImageView|
152 | |app:v_imageRound |dimension|10dp|sets border radius to the ImageView|
153 | |app:v_shadowOffset|dimension|40dp|configure the distance between the Image and the Shadow|
154 | |android:scaleType|string|"centerCrop"|configure the Image scaling|
155 |
156 |
157 | ## Find this library useful? :heart:
158 | Support it by joining [**stargazers**](https://github.com/virtualvivek/BlurShadowImageView/stargazers) for this repository. :star:
159 |
160 | # Branches
161 | Branch -version 4.x [ AndroidX ] ‣ Current Branch
162 | Branch -version 1.x Support Library View Branch
163 |
164 | # License
165 |
166 | BlurShadowImageView is licensed under `MIT license`. View [license](https://github.com/virtualvivek/BlurShadowImageView/blob/master/LICENSE).
167 | Copyright (c) 2020-24 [**Vivek Verma**](https://github.com/virtualvivek)
168 |
--------------------------------------------------------------------------------
/apk/BlurShadow.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/BlurShadow.apk
--------------------------------------------------------------------------------
/apk/BlurShadow_v1_branch.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/BlurShadow_v1_branch.apk
--------------------------------------------------------------------------------
/apk/app_barcode.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/app_barcode.PNG
--------------------------------------------------------------------------------
/apk/preview/app_icon_demo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/preview/app_icon_demo.jpg
--------------------------------------------------------------------------------
/apk/preview/app_icon_demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/preview/app_icon_demo.png
--------------------------------------------------------------------------------
/apk/preview/app_icon_demo_app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/preview/app_icon_demo_app.png
--------------------------------------------------------------------------------
/apk/preview/app_icon_title.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/preview/app_icon_title.jpg
--------------------------------------------------------------------------------
/apk/preview/app_icon_title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/preview/app_icon_title.png
--------------------------------------------------------------------------------
/apk/preview/app_load_online.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/preview/app_load_online.gif
--------------------------------------------------------------------------------
/apk/preview/app_preview_offset-max.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/preview/app_preview_offset-max.png
--------------------------------------------------------------------------------
/apk/preview/app_preview_offset.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/preview/app_preview_offset.jpg
--------------------------------------------------------------------------------
/apk/preview/app_preview_offset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/apk/preview/app_preview_offset.png
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | generateDebugSources
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 29
5 | buildToolsVersion "29.0.3"
6 |
7 | compileOptions {
8 | sourceCompatibility JavaVersion.VERSION_1_8
9 | targetCompatibility JavaVersion.VERSION_1_8
10 | }
11 |
12 |
13 | defaultConfig {
14 | applicationId "me.virtualiz.blurshadowimageview"
15 | minSdkVersion 21
16 | targetSdkVersion 29
17 | versionCode 1
18 | versionName "1.1"
19 | vectorDrawables.useSupportLibrary = true
20 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
21 | }
22 | buildTypes {
23 | release {
24 | minifyEnabled false
25 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
26 | }
27 | }
28 | }
29 |
30 | dependencies {
31 | implementation fileTree(dir: 'libs', include: ['*.jar'])
32 |
33 | implementation 'androidx.appcompat:appcompat:1.2.0'
34 | implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
35 | implementation 'com.google.android.material:material:1.2.0'
36 | implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
37 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
38 | implementation 'com.squareup.picasso:picasso:2.71828'
39 |
40 | testImplementation 'junit:junit:4.12'
41 | androidTestImplementation 'androidx.test.ext:junit:1.1.2'
42 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
43 |
44 | implementation project(':library')
45 | }
46 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\x\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/java/me/virtualiz/blurshadowimageviewEx/MainActivity.java:
--------------------------------------------------------------------------------
1 | package me.virtualiz.blurshadowimageviewEx;
2 |
3 | import android.content.Intent;
4 | import android.graphics.Bitmap;
5 | import android.graphics.drawable.Drawable;
6 | import android.net.Uri;
7 | import android.os.Bundle;
8 | import android.view.View;
9 | import android.widget.Button;
10 | import android.widget.TextView;
11 | import androidx.appcompat.app.AppCompatActivity;
12 | import com.squareup.picasso.Picasso;
13 | import com.squareup.picasso.Target;
14 |
15 | import me.virtualiz.blurshadowimageview.BlurShadowImageView;
16 |
17 | public class MainActivity extends AppCompatActivity {
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.activity_main);
23 |
24 | getSupportActionBar().hide();
25 |
26 | Button buttonLink = findViewById(R.id.buttonLink);
27 | final BlurShadowImageView demo_img = findViewById(R.id.demo_img);
28 | Button load_image_button = findViewById(R.id.buttonLoadImg);
29 |
30 |
31 | demo_img.setImageResource(R.drawable.ironman_80);
32 |
33 | load_image_button.setOnClickListener((View v)-> {
34 | Target target = new Target() {
35 | @Override
36 | public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
37 | // Bitmap is loaded, use image here
38 | demo_img.setImageBitmap(bitmap);
39 | }
40 | @Override
41 | public void onBitmapFailed(Exception e, Drawable d) {
42 | // Fires if bitmap couldn't be loaded.
43 | }
44 | @Override
45 | public void onPrepareLoad(Drawable d){
46 | // Fires bitmap on prepare.
47 | }
48 | };
49 | Picasso.get().load("https://i.imgur.com/DvpvklR.png").into(target);
50 | });
51 |
52 |
53 | buttonLink.setOnClickListener((View v)-> {
54 | Uri uri = Uri.parse("https://www.github.com/virtualvivek/BlurShadowImageView");
55 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
56 | startActivity(intent);
57 | });
58 |
59 |
60 |
61 | TextView link_text = findViewById(R.id.link_text);
62 | link_text.setOnClickListener((View v)-> {
63 | Uri uri = Uri.parse("https://www.github.com/virtualvivek/BlurShadowImageView");
64 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
65 | startActivity(intent);
66 | });
67 |
68 | }
69 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_green_round_touchlistner.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_green_round_touchlistner_presses.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_green_round_touchlistner_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_white_round_touchlistner.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_white_round_touchlistner_presses.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/background_white_round_touchlistner_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/github.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ironman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/drawable/ironman.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ironman_80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/drawable/ironman_80.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/lambo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/drawable/lambo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/nature.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/drawable/nature.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/product_garments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/drawable/product_garments.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/product_shoes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/drawable/product_shoes.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
26 |
27 |
28 |
32 |
33 |
37 |
38 |
47 |
48 |
57 |
58 |
65 |
66 |
75 |
76 |
77 |
94 |
95 |
102 |
103 |
117 |
118 |
124 |
125 |
126 |
133 |
134 |
135 |
142 |
143 |
144 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #EEE
4 | #999
5 | #FF4081
6 | #EEEEEE
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BlurShadowImageView
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 |
9 | }
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.6.4'
12 |
13 |
14 | // NOTE: Do not place your application dependencies here; they belong
15 | // in the individual module build.gradle files
16 | }
17 | }
18 |
19 | allprojects {
20 | repositories {
21 | google()
22 | jcenter()
23 | }
24 | }
25 |
26 | task clean(type: Delete) {
27 | delete rootProject.buildDir
28 | }
29 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | android.enableJetifier=true
13 | android.useAndroidX=true
14 | org.gradle.jvmargs=-Xmx1536m
15 |
16 | # When configured, Gradle will run in incubating parallel mode.
17 | # This option should only be used with decoupled projects. More details, visit
18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
19 | # org.gradle.parallel=true
20 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualvivek/BlurShadowImageView/1883d2f62187f9c6c7eb2e71b65e811a25d3e0e9/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Sep 30 13:46:21 IST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/library/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 29
5 | buildToolsVersion "29.0.3"
6 |
7 | compileOptions {
8 | sourceCompatibility JavaVersion.VERSION_1_8
9 | targetCompatibility JavaVersion.VERSION_1_8
10 | }
11 |
12 |
13 | defaultConfig {
14 | minSdkVersion 21
15 | targetSdkVersion 29
16 | versionCode 1
17 | versionName "1.1"
18 | vectorDrawables.useSupportLibrary = true
19 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
20 | }
21 | buildTypes {
22 | release {
23 | minifyEnabled false
24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25 | }
26 | }
27 | }
28 |
29 | dependencies {
30 | implementation fileTree(dir: 'libs', include: ['*.jar'])
31 |
32 | implementation 'androidx.appcompat:appcompat:1.2.0'
33 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
34 | testImplementation 'junit:junit:4.12'
35 | androidTestImplementation 'androidx.test.ext:junit:1.1.2'
36 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
37 | }
--------------------------------------------------------------------------------
/library/library.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | generateDebugSources
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/library/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\x\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/library/src/androidTest/java/me/virtualiz/blurshadowimageview/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package me.virtualiz.blurshadowimageview;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("me.virtualiz.blurshadowimageview.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/library/src/main/java/me/virtualiz/blurshadowimageview/BlurShadowImageView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 vivekverma
3 | *
4 | * Licensed under the MIT License, (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://github.com/virtualvivek/BlurShadowImageView/blob/main/LICENSE
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package me.virtualiz.blurshadowimageview;
17 |
18 | import android.content.Context;
19 | import android.content.res.Resources;
20 | import android.content.res.TypedArray;
21 | import android.graphics.Bitmap;
22 | import android.graphics.BitmapFactory;
23 | import android.graphics.Color;
24 | import android.graphics.PorterDuff;
25 | import android.graphics.drawable.BitmapDrawable;
26 | import android.graphics.drawable.Drawable;
27 | import android.util.AttributeSet;
28 | import android.view.Gravity;
29 | import android.widget.ImageView;
30 | import android.widget.LinearLayout;
31 | import android.widget.RelativeLayout;
32 | import me.virtualiz.blurshadowimageview.helper.FadingImageView;
33 | import me.virtualiz.blurshadowimageview.helper.RoundImageView;
34 |
35 | /**
36 | * ================================================
37 | * virtualvivek7@gmail.com
38 | * -version:4.0
39 | * -updated :1 Sep 2021
40 | * Developed by:
41 | * Vivek Verma
42 | * ================================================
43 | */
44 | public class BlurShadowImageView extends RelativeLayout {
45 |
46 | private int imageRound = dpToPx(10);
47 | private int shadowOffset = dpToPx(50);
48 | boolean mInvalidat;
49 | private Bitmap blurredImage;
50 |
51 | public BlurShadowImageView(Context context) {
52 | this(context, null);
53 | }
54 | public BlurShadowImageView(Context context, AttributeSet attrs) {
55 | this(context, attrs, 0);
56 | }
57 | public BlurShadowImageView(Context context, AttributeSet attrs, int defStyleAttr) {
58 | super(context, attrs, defStyleAttr);
59 | initView(context, attrs);
60 | }
61 | public static int dpToPx(int dp){
62 | return (int) (dp* Resources.getSystem().getDisplayMetrics().density);
63 | }
64 | private void initView(Context context, AttributeSet attrs) {
65 |
66 | RoundImageView roundImageView = new RoundImageView(context);
67 | FadingImageView blurImageView = new FadingImageView(context);
68 |
69 | int imageresource, imageScaleTypeIndex;
70 |
71 | setGravity(Gravity.CENTER);
72 | setLayerType(LAYER_TYPE_SOFTWARE, null);
73 |
74 | imageresource = -1;
75 |
76 | if (attrs != null) {
77 | TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.BlurShadowImageView);
78 |
79 | if (a.hasValue(R.styleable.BlurShadowImageView_v_imageSrc)) {
80 | imageresource = a.getResourceId(R.styleable.BlurShadowImageView_v_imageSrc, -1);
81 | }
82 | imageRound = a.getDimensionPixelSize(R.styleable.BlurShadowImageView_v_imageRound, imageRound);
83 | shadowOffset = a.getDimensionPixelSize(R.styleable.BlurShadowImageView_v_shadowOffset, shadowOffset);
84 | imageScaleTypeIndex = a.getInt(R.styleable.BlurShadowImageView_android_scaleType, -1);
85 |
86 | if (imageScaleTypeIndex >= 0) {
87 | ImageView.ScaleType[] types = ImageView.ScaleType.values();
88 | ImageView.ScaleType scaleType = types[imageScaleTypeIndex];
89 | roundImageView.setScaleType(scaleType);
90 | }
91 | else {
92 | roundImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
93 | }
94 |
95 | a.recycle();
96 | }
97 | else {
98 | float density = context.getResources().getDisplayMetrics().density;
99 | imageRound = (int) (imageRound * density);
100 | imageresource = -1;
101 | }
102 |
103 | //---- Layer ImageView ---------------------------------------------------------------------
104 | if (imageresource == -1) {
105 | roundImageView.setImageResource(android.R.color.transparent);
106 | } else {
107 | roundImageView.setImageResource(imageresource);
108 | }
109 |
110 |
111 | //---- Layer BlurView ----------------------------------------------------------------------
112 | blurImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
113 | //Blurring techinique without renderscript --------------
114 | if (imageresource == -1) {
115 | Bitmap image = Bitmap.createBitmap(20, 20, Bitmap.Config.ARGB_8888);
116 | image.eraseColor(Color.LTGRAY);
117 | blurImageView.setImageBitmap(image);
118 | }
119 | else {
120 | Bitmap bitmap = BitmapFactory.decodeResource(getResources(),imageresource);
121 |
122 | if (!isInEditMode()) {
123 | blurredImage = Bitmap.createScaledBitmap(bitmap,8,8,true);
124 | blurImageView.setImageBitmap(blurredImage);
125 | }
126 | //IF is on Edit mode render Basic Shadow to avoid rendering issue
127 | else {
128 | BitmapDrawable bitmapDrawable = new BitmapDrawable(context.getResources(),bitmap);
129 |
130 | bitmapDrawable.setColorFilter(0xff999999, PorterDuff.Mode.ADD);
131 | blurImageView.setImageDrawable(bitmapDrawable);
132 | }
133 | }
134 |
135 | // Setting Layour For BlurView --
136 | LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT);
137 | blurImageView.setLayoutParams(lp);
138 |
139 | // Setting Layout for RoundImageView --
140 | RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
141 | lp2.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
142 | lp2.setMargins(dpToPx(15),0,dpToPx(15),shadowOffset);
143 |
144 | roundImageView.setLayoutParams(lp2);
145 |
146 | addView(blurImageView);
147 | addView(roundImageView);
148 |
149 | getViewTreeObserver().addOnGlobalLayoutListener(()-> {
150 | int N = getChildCount();
151 | for (int i = 0; i < N; i++) {
152 | N = getChildCount();
153 | }
154 | ((RoundImageView) getChildAt(1)).setRound(imageRound);
155 |
156 | mInvalidat = true;
157 | });
158 |
159 | }
160 |
161 |
162 | public void setImageResource(int resId) {
163 | //Setting RoundedImageView layer
164 | ((RoundImageView) getChildAt(1)).setImageResource(resId);
165 |
166 | //Setting FadedBlurredImageView layer
167 | Bitmap bitmap = BitmapFactory.decodeResource(getResources(),resId);
168 | blurredImage = Bitmap.createScaledBitmap(bitmap,8,8,true);
169 | ((FadingImageView) getChildAt(0)).setImageBitmap(blurredImage);
170 |
171 | invalidate();
172 | mInvalidat = true;
173 | }
174 |
175 |
176 |
177 | public void setImageDrawable(Drawable drawable) {
178 | //Setting RoundedImageView layer
179 | ((RoundImageView) getChildAt(1)).setImageDrawable(drawable);
180 |
181 | //Setting FadedBlurredImageView layer
182 | Bitmap bitmap = ((BitmapDrawable)drawable).getBitmap();
183 | blurredImage = Bitmap.createScaledBitmap(bitmap,8,8,true);
184 | ((FadingImageView) getChildAt(0)).setImageBitmap(blurredImage);
185 |
186 | invalidate();
187 | mInvalidat = true;
188 | }
189 |
190 |
191 |
192 | public void setImageBitmap(Bitmap bitmap) {
193 | //Setting RoundedImageView layer
194 | ((RoundImageView) getChildAt(1)).setImageBitmap(bitmap);
195 |
196 | //Setting FadedBlurredImageView layer
197 | blurredImage = Bitmap.createScaledBitmap(bitmap,8,8,true);
198 | ((FadingImageView) getChildAt(0)).setImageBitmap(blurredImage);
199 |
200 | invalidate();
201 | mInvalidat = true;
202 | }
203 |
204 |
205 | public void setImageRadius(int radius_) {
206 | if (radius_ > getChildAt(1).getWidth() / 2 || radius_ > getChildAt(1).getHeight() / 2) {
207 | if (getChildAt(1).getWidth() > getChildAt(1).getHeight()) {
208 | radius_ = getChildAt(1).getHeight() / 2;
209 | } else {
210 | radius_ = getChildAt(1).getWidth() / 2;
211 | }
212 | }
213 | this.imageRound = radius_;
214 | ((RoundImageView) getChildAt(1)).setRound(imageRound);
215 | invalidate();
216 | mInvalidat = true;
217 | }
218 |
219 |
220 | }
--------------------------------------------------------------------------------
/library/src/main/java/me/virtualiz/blurshadowimageview/helper/FadingImageView.java:
--------------------------------------------------------------------------------
1 | package me.virtualiz.blurshadowimageview.helper;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.Context;
5 | import android.content.res.Resources;
6 | import android.graphics.Bitmap;
7 | import android.graphics.Canvas;
8 | import android.graphics.Color;
9 | import android.graphics.Paint;
10 | import android.graphics.PorterDuff;
11 | import android.graphics.PorterDuffXfermode;
12 | import android.util.AttributeSet;
13 | import android.util.TypedValue;
14 | import android.widget.ImageView;
15 |
16 | @SuppressLint("AppCompatCustomView")
17 | public class FadingImageView extends ImageView {
18 |
19 | private boolean mFadeRight;
20 | private boolean mFadeLeft;
21 | private boolean mFadeTop;
22 | private boolean mFadeBottom;
23 | private Paint paint2;
24 | private Context c;
25 |
26 | public FadingImageView(Context c, AttributeSet attrs, int defStyle) {
27 | super(c, attrs, defStyle);
28 |
29 | this.c = c;
30 | init();
31 | }
32 | public FadingImageView(Context c, AttributeSet attrs) {
33 | super(c, attrs);
34 |
35 | this.c = c;
36 | init();
37 | }
38 | public FadingImageView(Context c) {
39 | super(c);
40 |
41 | this.c = c;
42 | init();
43 | }
44 | private void init() {
45 | Paint paint;
46 | // Enable horizontal fading
47 | this.setHorizontalFadingEdgeEnabled(true);
48 | this.setVerticalFadingEdgeEnabled(true);
49 | // Apply default fading length
50 | this.setEdgeLength(78);
51 | // Apply default side
52 | this.setFadeRight(true);
53 | this.setFadeLeft(true);
54 | this.setFadeBottom(true);
55 | this.setFadeTop(true);
56 |
57 | //code to round the fadded view
58 | paint = new Paint();
59 | paint.setColor(Color.WHITE);
60 | paint.setAntiAlias(true);
61 | paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OUT));
62 |
63 | paint2 = new Paint();
64 | paint2.setXfermode(null);
65 | }
66 | public void setFadeRight(boolean fadeRight) {
67 | mFadeRight = fadeRight;
68 | }
69 | public void setFadeLeft(boolean fadeLeft) {
70 | mFadeLeft = fadeLeft;
71 | }
72 | public void setFadeTop(boolean fadeTop) {
73 | mFadeTop = fadeTop;
74 | }
75 | public void setFadeBottom(boolean fadeBottom) {
76 | mFadeBottom = fadeBottom;
77 | }
78 | public void setEdgeLength(int length) {
79 | this.setFadingEdgeLength(getPixels(length));
80 | }
81 | @Override
82 | protected float getTopFadingEdgeStrength() {
83 | return mFadeTop ? 1.0f : 0.0f;
84 | }
85 | @Override
86 | protected float getBottomFadingEdgeStrength() {
87 | return mFadeBottom ? 1.0f : 0.0f;
88 | }
89 | @Override
90 | protected float getLeftFadingEdgeStrength() {
91 | return mFadeLeft ? 1.0f : 0.0f;
92 | }
93 | @Override
94 | protected float getRightFadingEdgeStrength() {
95 | return mFadeRight ? 1.0f : 0.0f;
96 | }
97 | @Override
98 | public boolean hasOverlappingRendering() {
99 | return true;
100 | }
101 | @Override
102 | public boolean onSetAlpha(int alpha) {
103 | return false;
104 | }
105 | private int getPixels(int dipValue) {
106 | Resources r = c.getResources();
107 | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
108 | dipValue, r.getDisplayMetrics());
109 | }
110 | @Override
111 | public void draw(Canvas canvas) {
112 | Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);
113 | Canvas canvas2 = new Canvas(bitmap);
114 | super.draw(canvas2);
115 | canvas.drawBitmap(bitmap, 0, 0, paint2);
116 | bitmap.recycle();
117 | }
118 | }
--------------------------------------------------------------------------------
/library/src/main/java/me/virtualiz/blurshadowimageview/helper/RoundImageView.java:
--------------------------------------------------------------------------------
1 | package me.virtualiz.blurshadowimageview.helper;
2 |
3 | import android.annotation.SuppressLint;
4 | import android.content.Context;
5 | import android.graphics.Bitmap;
6 | import android.graphics.Canvas;
7 | import android.graphics.Color;
8 | import android.graphics.Paint;
9 | import android.graphics.Path;
10 | import android.graphics.PorterDuff;
11 | import android.graphics.PorterDuffXfermode;
12 | import android.graphics.RectF;
13 | import android.util.AttributeSet;
14 | import android.widget.ImageView;
15 |
16 | @SuppressLint("AppCompatCustomView")
17 | public class RoundImageView extends ImageView {
18 |
19 | private Paint paint;
20 | private int roundWidth = 0;
21 | private int roundHeight = 0;
22 | private Paint paint2;
23 |
24 | public RoundImageView(Context context) {
25 | this(context, null);
26 | }
27 | public RoundImageView(Context context, AttributeSet attrs) {
28 | this(context, attrs, 0);
29 | }
30 | public RoundImageView(Context context, AttributeSet attrs, int defStyle) {
31 | super(context, attrs, defStyle);
32 | init(context);
33 | }
34 | private void init(Context context) {
35 | paint = new Paint();
36 | paint.setColor(Color.WHITE);
37 | paint.setAntiAlias(true);
38 | paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OUT));
39 |
40 | paint2 = new Paint();
41 | paint2.setXfermode(null);
42 | }
43 | public void setRound(int round_) {
44 | if(round_ > getWidth()/2 || round_ > getHeight()/2){
45 | if(getWidth() > getHeight()){
46 | round_ = getHeight()/2;
47 | }else{
48 | round_ = getWidth()/2;
49 | }
50 | }
51 | this.roundHeight = round_;
52 | this.roundWidth = round_;
53 | invalidate();
54 | }
55 | @Override
56 | public void draw(Canvas canvas) {
57 | Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);
58 | Canvas canvas2 = new Canvas(bitmap);
59 | super.draw(canvas2);
60 | drawLiftUp(canvas2);
61 | drawLiftDown(canvas2);
62 | drawRightUp(canvas2);
63 | drawRightDown(canvas2);
64 | canvas.drawBitmap(bitmap, 0, 0, paint2);
65 | bitmap.recycle();
66 | }
67 | private void drawLiftUp(Canvas canvas) {
68 | Path path = new Path();
69 | path.moveTo(0, roundHeight);
70 | path.lineTo(0, 0);
71 | path.lineTo(roundWidth, 0);
72 | path.arcTo(new RectF(0, 0, roundWidth * 2, roundHeight * 2), -90, -90);
73 | path.close();
74 | canvas.drawPath(path, paint);
75 | }
76 | private void drawLiftDown(Canvas canvas) {
77 | Path path = new Path();
78 | path.moveTo(0, getHeight() - roundHeight);
79 | path.lineTo(0, getHeight());
80 | path.lineTo(roundWidth, getHeight());
81 | path.arcTo(new RectF(0, getHeight() - roundHeight * 2, roundWidth * 2, getHeight()), 90, 90);
82 | path.close();
83 | canvas.drawPath(path, paint);
84 | }
85 | private void drawRightDown(Canvas canvas) {
86 | Path path = new Path();
87 | path.moveTo(getWidth() - roundWidth, getHeight());
88 | path.lineTo(getWidth(), getHeight());
89 | path.lineTo(getWidth(), getHeight() - roundHeight);
90 | path.arcTo(new RectF(getWidth() - roundWidth * 2, getHeight() - roundHeight * 2, getWidth(), getHeight()), -0, 90);
91 | path.close();
92 | canvas.drawPath(path, paint);
93 | }
94 | private void drawRightUp(Canvas canvas) {
95 | Path path = new Path();
96 | path.moveTo(getWidth(), roundHeight);
97 | path.lineTo(getWidth(), 0);
98 | path.lineTo(getWidth() - roundWidth, 0);
99 | path.arcTo(new RectF(getWidth() - roundWidth * 2, 0, getWidth(), 0 + roundHeight * 2), -90, 90);
100 | path.close();
101 | canvas.drawPath(path, paint);
102 | }
103 | }
--------------------------------------------------------------------------------
/library/src/main/res/values/attr.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/library/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BlurShadowImageView
3 |
4 |
--------------------------------------------------------------------------------
/library/src/test/java/me/virtualiz/blurshadowimageview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.virtualiz.blurshadowimageview;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file is automatically generated by Android Studio.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file should *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 | #
7 | # Location of the SDK. This is only used by Gradle.
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | sdk.dir=C\:\\Users\\V\\AppData\\Local\\Android\\Sdk
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':library'
2 |
--------------------------------------------------------------------------------