Android - picasso shows only placeholder, not the image from URL

后端 未结 1 537
孤城傲影
孤城傲影 2021-01-19 14:34

I\'ve got this code

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCrea         


        
相关标签:
1条回答
  • 2021-01-19 14:54

    Try using just picasso.load() instead of Picasso.with()

    Something like this:

    Picasso.Builder builder = new Picasso.Builder(getApplicationContext());
    Picasso picasso = builder.build();
    picasso.load("http://nuclearpixel.com/content/icons/2010-02-09_stellar_icons_from_space_from_2005/earth_128.png").placeholder(R.drawable.ic_launcher).noFade().into(image_view);
    
    0 讨论(0)
提交回复
热议问题