SkillAgentSearch skills...

ShapeImageView

🔥🔥🔥支持显示任意图形,只有你想不到没有它做不到;不直接操作Bitmap,可绘制圆形或圆角矩形背景边框,另外新增4种显示模式(Supports displaying arbitrary graphics, only you can't think of it, you can't do it without it; without directly operating Bitmap, you can draw a circular or rounded rectangle background frame, and add 4 new display modes)

Install / Use

/learn @FlyJingFish/ShapeImageView
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ShapeImageView

Maven central GitHub stars GitHub forks GitHub issues GitHub license

中文版使用说明

ShapeImageView supports circle or rounded corners, and can draw circle background borders or rounded box background borders. In addition to the built-in properties of ImageView, 4 new display modes are added;

AlmightyShapeImageView supports the display of arbitrary graphics, only you can't think of it, you can't do it without it;

The ImageView in this library does not directly operate Bitmap, but Drawable, as long as the system's ImageView supports it, it can be displayed (such as the gif image loaded by Glide), you can use it with confidence! ! !

ShapeImageView|AlmightyShapeImageView ----- | ----- <img src="https://github.com/FlyJingFish/ShapeImageView/blob/master/screenshot/Screenshot_20221011_144810.jpg" width="400px" alt="show" />|<img src="https://github.com/FlyJingFish/ShapeImageView/blob/master/screenshot/Screenshot_20221031_123252.jpg" width="400px" alt="show" />

Special function

1、ShapeImageView supports gradient rounded borders or rounded borders, unlimited image settings, perfectly compatible with all image loading libraries

2、 The ShapeImageView rectangular image supports the independent setting of the angle value of the four corners, and the rectangular border also supports the independent setting of the angle value of the four corners.

3、ShapeImageView supports four display modes: startCrop, endCrop, autoStartCenterCrop, autoEndCenterCrop

AutoStartCenterCrop and autoEndCenterCrop display mode can be automatically switched between startCrop and centerCrop (endCrop and centerCrop) after setting autoCrop_height_width_ratio

4、AlmightyShapeImageView is perfectly compatible with all image loading libraries, supports defining arbitrary graphics, only you can't think of it without it

The first step, the root directory build.gradle

dependencies {
    implementation 'io.github.flyjingfish:shapeimageview:1.5.7'
}

The second step, instructions for use

一、ShapeImageView Instructions for Use

ShapeImageView example

<com.flyjingfish.shapeimageviewlib.ShapeImageView
    android:id="@+id/iv_centerCrop"
    android:layout_width="110dp"
    android:layout_height="110dp"
    android:layout_marginStart="10dp"
    android:padding="10dp"
    app:FlyJFish_shape="rectangle"
    app:FlyJFish_shape_border="rectangle"
    app:FlyJFish_shape_border_width="3dp"
    app:FlyJFish_shape_border_angle="45"
    app:FlyJFish_shape_left_top_radius="8dp"
    app:FlyJFish_shape_right_top_radius="12dp"
    app:FlyJFish_shape_right_bottom_radius="16dp"
    app:FlyJFish_shape_left_bottom_radius="20dp"
    app:FlyJFish_shape_border_left_top_radius="10dp"
    app:FlyJFish_shape_border_right_top_radius="15dp"
    app:FlyJFish_shape_border_right_bottom_radius="20dp"
    app:FlyJFish_shape_border_left_bottom_radius="25dp"
    app:FlyJFish_shape_border_gradient="true"
    app:FlyJFish_shape_border_startColor="@color/purple_200"
    app:FlyJFish_shape_border_endColor="@color/teal_700"
    android:scaleType="centerCrop" />

Outer frame use

1,You need to set padding specially, otherwise some ScaleType of the picture will be filled with ImageView by default.

2,The color distribution of the gradient frame can be set through setGradientPositions, and the default null value is evenly distributed

3,Gradient color If you want to customize more colors, you can set it through setGradientColors

List of properties

| attr | format | description | |-------------------------------------------|:---------------:|:-------------------------------------------------------------------------------------------:| | FlyJFish_shape | enum | The picture is a rectangle/oval circle | | FlyJFish_shape_radius | dimension | The four corners of the image are rounded | | FlyJFish_shape_left_top_radius | dimension | The upper left corner of the image is rounded | | FlyJFish_shape_right_top_radius | dimension | Round corners in the upper right corner of the image | | FlyJFish_shape_right_bottom_radius | dimension | The bottom right corner of the image is rounded | | FlyJFish_shape_left_bottom_radius | dimension | The bottom left corner of the image is rounded | | FlyJFish_shape_start_top_radius | dimension | image top left (Rtl: top right) corner rounded | | FlyJFish_shape_end_top_radius | dimension | image top right (Rtl: top left) corner rounded | | FlyJFish_shape_end_bottom_radius | dimension | picture bottom right (Rtl: bottom left) corner rounded | | FlyJFish_shape_start_bottom_radius | dimension | picture bottom left (Rtl: bottom right) corner rounded | | FlyJFish_shape_border | enum | The background border drawing shape is none without drawing/rectangle rectangle/oval circle | | FlyJFish_shape_border_radius | dimension | The four corners of the background border are rounded | | FlyJFish_shape_border_left_top_radius | dimension | The top left corner of the background border is rounded | | FlyJFish_shape_border_right_top_radius | dimension | rounded corners in the upper right corner of the background border | | FlyJFish_shape_border_right_bottom_radius | dimension | The bottom right corner of the background border is rounded | | FlyJFish_shape_border_left_bottom_radius | dimension | The bottom left corner of the background border is rounded | | FlyJFish_shape_border_start_top_radius | dimension | background border top left (Rtl: top right) corner rounded | | FlyJFish_shape_border_end_top_radius | dimension | background border top right (Rtl: top left) corner rounded | | FlyJFish_shape_border_end_bottom_radius | dimension | background border bottom right (Rtl: bottom left) corner rounded | | FlyJFish_shape_border_start_bottom_radius | dimension | The bottom left (Rtl: bottom right) corner of the background border is rounded | | FlyJFish_shape_border_color | color/reference | Background border drawing color | | FlyJFish_shape_border_gradient | boolean | Whether the background border is drawn in gradient color | | FlyJFish_shape_border_startColor | color/reference | The background border draw gradient color start color | | FlyJFish_shape_border_centerColor | color/reference | The background border draws the gradient middle color | | FlyJFish_shape_border_endColor | color/reference | The background border draws the gradient color end color | | FlyJFish_shape_border_angle | float | Start angle of background border drawing gradient color | | FlyJFish_shape_border_rtl_angle | boolean | Does the gradient start angle of the background border support mirror Rtl adaptation | | FlyJFish_shape_border_strokeWidth | dimension | width of background border drawing brush | | FlyJFish_autoCrop_height_width_ratio | float | The image aspect ratio is a multiple of the View aspect ratio | | FlyJFish_shapeScaleType | enum | If you set the new display mode to set this, the details are as follows: |

| FlyJFish_shapeScaleType | description | |-------------------------|:-----------------------------------------------------:| | startCrop | Crop start top left | | endCrop | Crop start bottom right | | autoStartCenterCrop | Automatically switch between startCrop and centerCrop | | autoEndCenterCrop | Automatically switch between endCrop and centerCrop |

二、AlmightyShapeImageView Instructions for Use

AlmightyShapeImageView example(Built-in library ❤️ [ic_vector_heart](https://github

Related Skills

View on GitHub
GitHub Stars44
CategoryCustomer
Updated8mo ago
Forks7

Languages

Java

Security Score

82/100

Audited on Jul 25, 2025

No findings