Picasso Library in Sketchware Easy image loading Library

Picasso Library in Sketchware


In Sketchware its hard to Round corner of an online image 
we can round corner of an offline image but its hard with an online image
thats why we have picasso

A powerful image downloading and caching library for Android
Using Picasso we can load images from url to app with animations
We can customize images on the go

1. Round corner

2. Load from URL

3. Resize

4. Crop 

5. Circle crop

 And many more...

And also its better than the sketchware default image library 


IMPORTANT ASD :

Picasso.with(getApplicationContext())
.load(image)
//image=replace with image url variable
.into(imageview);
//imageview name

Replace "image" with your imageurl variable
Replace "imageview" with your imageview name



For image customisations :

Picasso.with(getApplicationContext())
.load(image)
// use customisation codes here
.into(imageview);


Customization codes
Use the following codes in between the above code otherwise may not work

Set loading image :

.placeholder(R.drawable.loading)
//set image loading.jpg/loading.png when image is loading
Set error image :

.error(R.drawable.error)
//set image error.jpg/error.png when image unable to load
Resize image :
.resize(100 , 100)
// Resize original image to 100×100 resolution
Round Corner :

.transform(new RoundedCornersTransformation(40,40))
//round image corners by 40 (change the 40 to any integer value to get your desired design)
Fit image layout :

.fit()
//Make image fit the Imageview layout dimensions
  
Center Crop :

.resize(300,300)
//need resize to work the centercrop
.centerCrop()
// Centercrop the original image 
Circle image :

.transform(new CropCircleTransformation())
//circle crop the original image useful for Profile picture implementation
Circle image  (non square image ):

.fit().centerCrop()
.transform(new CropCircleTransformation())
//use fit() & centercrop() to Perfectly circle an Non-Square image ( Rectangular image )
You can use above codes in between the base codes
Example code:

Picasso.with(getApplicationContext())
.load(image)
.placeholder(R.drawable.loading)
.error(R.drawable.error)
.fit().centerCrop()
.transform(new CropCircleTransformation())
.into(imageview);
The above combination of codes will create an perfect circle image from Rectangular image ( Non-Square image)

OUTPUT

If you have any doubts comment bellow or message us on insatgram @dreamae