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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -