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++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -