lawloretienne / ImageGallery

A gallery used to host an array of images
Apache License 2.0
645 stars 116 forks source link

Add Place Holder #2

Closed hmz17 closed 8 years ago

lawloretienne commented 9 years ago

What exactly do you mean by place holder?

norrisboat commented 9 years ago

An image to fill the view whiles the actual image loads

hmz17 commented 9 years ago

Like when I pass the URL of image. It downloads it through Internet and then displays it once it gets downloaded. Until then the screen is blank.

What I mean by place holder is, during the time image is being downloaded the image view will contain some other thing. Like a progress bar or image showing something else.

Setting a place holder gives us feedback, that image is being downloaded and mobile is not stalled.

It can be easily done editing the code

Picasso supports both download and error placeholders as optional features.

Picasso.with(context)

.load(url) .placeholder(R.drawable.user_placeholder) . error(R.drawable.user_placeholder_error) . into(imageView);

What exactly do you mean by place holder?

— Reply to this email directly or view it on GitHub https://github.com/lawloretienne/ImageGallery/issues/2#issuecomment-147547710 .

lawloretienne commented 9 years ago

Great idea. I will look into that.

lawloretienne commented 8 years ago

screenshot_20160226-144246

Hey @hmz17 right now I have set the background to grey so it appears that something will be taking its place. Is that sufficient?

hmz17 commented 8 years ago

Yes thats fine :smile: