Display a defaul Image when the image is loading
I need to display an indication that the image is onLoading so my solution is to setImageDrawable but didn't work.
This is what i had tried :
ArrayList<ImageView> images = new ArrayList<ImageView>(); for(final Photos photo : MainApplication.getPhotos()){ ImageView image = new ImageView(getActivity()); image.setImageDrawable(getActivity().getResources().getDrawable(R.drawable.default_image)); image.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getActivity(), ImageDisplayerActivity.class);
intent.putExtra("url",photo.getUrl() );
getActivity().startActivity(intent);
}
});
@selmanon use instead of using setImageDrawable try using:
image.setImageResource(R.drawable.default_image);
@jacobmoncur thank you for the replay but nothing changed
@selmanon can you ensure that the images are being added to the QuiltView?
@jacobmoncur how ? btw, this is my whole code https://gist.github.com/selmanon/18e37f68c7f97e5bc15c
@jacobmoncur Yeah all my images are displayed after download but nope the default image