android - ImageView Only Appears When Setting Background in XML - Not Using Picasso -
i have strange situation. have imageview (imageview1) should populated image using picasso:
imageview imageitem = (imageview) findviewbyid(r.id.imageview1); picasso.with(this).load(boxart) .fit().centerinside().into(imageitem);
for strange reason - imageview not populate when using picasso - add background via xml: android:background="@drawable/boxart" both show - don't understand.
xml:
screenshot:
with android:background="@drawable/boxart" - http://imgur.com/7nmvdct without android:background="@drawable/boxart" - http://imgur.com/unqowhp
any suggestions appreciated.
it looks similar other issues: https://github.com/square/picasso/issues/457
since using wrap_content
, , don't have content on imageview, renders height=0 when loading image picasso, set fit()
, adjusts new image imageview size. since height 0, nothing renders.
some things can do:
- if using older version, update picasso latest version.
- make imageview match_parent desired size.
Comments
Post a Comment