android - Network image view's center_crop not working -


i creating networkimageview programmatically this:

final networkimageview niv = new networkimageview(context);          niv.setlayoutparams(new viewgroup.layoutparams(viewgroup.layoutparams.match_parent, viewgroup.layoutparams.match_parent));         niv.setscaletype(imageview.scaletype.center_crop);         niv.setimageurl("www.example.com/images/example.jpg", imageloader); 

but scaletype.center_crop feature not working. have idea? thank you.

you using scaletype imageview, should using networkimageview

niv.setscaletype(networkimageview.scaletype.center_crop); 

i set image url before scale image.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -