├── app
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── ids.xml
│ │ │ ├── colors.xml
│ │ │ └── themes.xml
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── drawable-xxhdpi
│ │ │ ├── ic_rhombus.png
│ │ │ └── ic_triangle.png
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ ├── ic_launcher_round.webp
│ │ │ └── img_load_placeholder.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── drawable
│ │ │ ├── ic_circle.xml
│ │ │ ├── ic_vector_pentagon.xml
│ │ │ ├── ic_vector_sector.xml
│ │ │ ├── ic_press.xml
│ │ │ ├── ic_vector_snowflake.xml
│ │ │ ├── ic_vector_flower.xml
│ │ │ └── ic_launcher_background.xml
│ │ ├── color
│ │ │ ├── press.xml
│ │ │ ├── press_end.xml
│ │ │ └── press_start.xml
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── layout
│ │ │ ├── item_listview.xml
│ │ │ ├── activity_almighty_list.xml
│ │ │ ├── activity_main.xml
│ │ │ ├── activity_almighty.xml
│ │ │ ├── activity_scale_type.xml
│ │ │ └── activity_scale_type2.xml
│ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ └── raw
│ │ │ └── dog_heart.svg
│ │ ├── java
│ │ └── com
│ │ │ └── flyjingfish
│ │ │ └── shapeimageview
│ │ │ ├── MyApplication.java
│ │ │ ├── svg
│ │ │ ├── SvgDrawableTranscoder.java
│ │ │ └── SvgDecoder.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MyAppGlideModule.java
│ │ │ ├── ActivityCompatHelper.java
│ │ │ ├── AlmightyListImageActivity.java
│ │ │ ├── AlmightyImageActivity.java
│ │ │ ├── ScaleTypeActivity.java
│ │ │ └── MyImageLoader.java
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
├── library
├── gradle.properties
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── res
│ │ ├── drawable
│ │ │ ├── ic_vector_heart.xml
│ │ │ └── ic_vector_star.xml
│ │ └── values
│ │ │ └── values.xml
│ │ └── java
│ │ └── com
│ │ └── flyjingfish
│ │ └── shapeimageviewlib
│ │ ├── ViewUtils.java
│ │ ├── ShapeImageViewAttacher.java
│ │ └── AlmightyShapeImageView.java
└── build.gradle
├── version.properties
├── gradle
├── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
└── publish.gradle
├── screenshot
├── Screenshot_20221011_144810.jpg
└── Screenshot_20221031_123252.jpg
├── .gitignore
├── settings.gradle
├── gradle.properties
├── gradlew.bat
├── gradlew
├── LICENSE
├── README-zh.md
└── README.md
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/library/gradle.properties:
--------------------------------------------------------------------------------
1 | PROJ_NAME=shapeimageview
--------------------------------------------------------------------------------
/version.properties:
--------------------------------------------------------------------------------
1 | #Wed Jun 18 19:26:42 CST 2025
2 | PROJ_VERSION=1.5.7
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ShapeImageView
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/screenshot/Screenshot_20221011_144810.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/screenshot/Screenshot_20221011_144810.jpg
--------------------------------------------------------------------------------
/screenshot/Screenshot_20221031_123252.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/screenshot/Screenshot_20221031_123252.jpg
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_rhombus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/drawable-xxhdpi/ic_rhombus.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_triangle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/drawable-xxhdpi/ic_triangle.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/img_load_placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-xxhdpi/img_load_placeholder.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlyJingFish/ShapeImageView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_circle.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Aug 01 17:29:10 CST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/app/src/main/res/color/press.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/color/press_end.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/color/press_start.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/java/com/flyjingfish/shapeimageview/MyApplication.java:
--------------------------------------------------------------------------------
1 | package com.flyjingfish.shapeimageview;
2 |
3 | import android.app.Application;
4 |
5 |
6 | public class MyApplication extends Application {
7 | public static MyApplication mInstance;
8 | @Override
9 | public void onCreate() {
10 | super.onCreate();
11 | mInstance = this;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_vector_pentagon.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_listview.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 | build/
17 | .idea
18 | androidTest/
19 | test/
20 | # Project exclude paths
21 | /library/build/
22 | /library/build/intermediates/javac/debug/classes/
--------------------------------------------------------------------------------
/library/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply from: "$rootDir/gradle/publish.gradle"
3 | android {
4 | compileSdkVersion rootProject.ext.sdkVersion
5 |
6 | defaultConfig {
7 | minSdkVersion rootProject.ext.minSdkVersion
8 | targetSdkVersion rootProject.ext.sdkVersion
9 | }
10 | namespace 'com.flyjingfish.shapeimageviewlib'
11 | }
12 |
13 | dependencies {
14 | implementation 'androidx.appcompat:appcompat:1.3.1'
15 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_vector_sector.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_almighty_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | gradlePluginPortal()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | maven { url 'https://jitpack.io' }
14 | maven { url "https://maven.aliyun.com/repository/public" }
15 | }
16 |
17 | }
18 | rootProject.name = "ShapeImageView"
19 | include ':app'
20 | include ':library'
21 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/ic_vector_heart.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_press.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
7 |
8 |
9 |
10 | -
11 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/library/src/main/res/drawable/ic_vector_star.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/flyjingfish/shapeimageview/svg/SvgDrawableTranscoder.java:
--------------------------------------------------------------------------------
1 | package com.flyjingfish.shapeimageview.svg;
2 |
3 | import android.graphics.Picture;
4 | import android.graphics.drawable.PictureDrawable;
5 | import androidx.annotation.NonNull;
6 | import androidx.annotation.Nullable;
7 | import com.bumptech.glide.load.Options;
8 | import com.bumptech.glide.load.engine.Resource;
9 | import com.bumptech.glide.load.resource.SimpleResource;
10 | import com.bumptech.glide.load.resource.transcode.ResourceTranscoder;
11 | import com.caverock.androidsvg.SVG;
12 |
13 | /**
14 | * Convert the {@link SVG}'s internal representation to an Android-compatible one ({@link Picture}).
15 | */
16 | public class SvgDrawableTranscoder implements ResourceTranscoder