在图像上提供有趣的剪裁(完美的头部用于个人资料用户界面)
Provide Funky cuts on image (The Perfect Header for Profile UI)
[Demo App - IS Library]
Frisson provide following features:
Step 1. Add the JitPack repository to your build file
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}Step 2. Add the dependency
dependencies {
compile 'com.github.IntruderShanky:Frisson:2.1.1'
} Glide.with(context)
.load(URL)
.asBitmap()
.into(new SimpleTarget(SimpleTarget.SIZE_ORIGINAL, SimpleTarget.SIZE_ORIGINAL) {
@Override
public void onResourceReady(Bitmap bitmap, GlideAnimation anim) {
frissonView.setBitmap(bitmap);
}
});frisson:scaleType="centerCrop"
frisson:scaleType="fitXY"frisson:src="@drawable/your_image"frisson:tintColor="@color/your_color"frisson:alphaValue="value"frisson:autoTint="true"frisson:tideHeight="50dp"frisson:tideCount="3"frisson:gradientType="linear"
frisson:gradientType="radial"frisson:gradient_endColor="#cc000000"
frisson:gradient_startColor="#00000000"frisson:gradientAngle="180"FrissonView frissonView = (FrissonView) findViewById(R.id.frisson_view);
// to set image from resources
frissonView.setImageSource(R.drawable.your_image);
// to set bitmap
frissonView.setBitmap(bitmap);
// to set the background color (color should have some alpha val)
frissonView.setColorTint(Color.GREEN);…[Glide]: https://github.com/bumptech/glide [Demo App - IS Library]: https://play.google.com/store/apps/details?id=com.intrusoft.islibrarydemo
暂无开放 Issues,或尚未同步最近议题。