android - Image not sized correctly when loading -


i using parse (i know it's dying service) fetch , store images me. included in these authenticated facebook user's profile pictures. pictures 50x50. if download image locally, throw in drawables folder, , load via xml (android:src="@drawable/dummy") result. it's want:

expected result

but when load image parse , load circularimageview, result: enter image description here

as can see, head shrunk :(

here's code:

the circularimageview in xml:

<de.hdodenhof.circleimageview.circleimageview         android:id="@+id/main_list_profile"         android:layout_width="wrap_content"         android:layout_height="match_parent"         android:layout_marginleft="@dimen/activity_horizontal_margin"         android:layout_marginright="@dimen/activity_horizontal_margin"         android:layout_margintop="@dimen/activity_vertical_margin"         android:layout_marginbottom="@dimen/activity_vertical_margin"         android:src="@drawable/dummy"/> 

loading image via picasso library

picasso.with(mcontext).load(caritem.getuserposted().getparsefile("profilethumb").geturl()).nofade().into(viewholder.profileimage); 

libraries used:

picasoo has method called resize can use that:

picasso.with(context).load(img_url)                 .resize(img_width, img_heghit).into(image_view); 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -