Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a defaul Image when the image is loading #24

Open
cloudshooterhuman opened this issue Sep 19, 2014 · 5 comments
Open

Display a defaul Image when the image is loading #24

cloudshooterhuman opened this issue Sep 19, 2014 · 5 comments

Comments

@cloudshooterhuman
Copy link

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 images = new ArrayList();
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);
            }
        });
@jacobmoncur
Copy link
Owner

@selmanon use instead of using setImageDrawable try using:

image.setImageResource(R.drawable.default_image);

@cloudshooterhuman
Copy link
Author

@jacobmoncur thank you for the replay but nothing changed

@jacobmoncur jacobmoncur reopened this Sep 19, 2014
@jacobmoncur
Copy link
Owner

@selmanon can you ensure that the images are being added to the QuiltView?

@cloudshooterhuman
Copy link
Author

@jacobmoncur how ? btw, this is my whole code https://gist.github.com/selmanon/18e37f68c7f97e5bc15c

@cloudshooterhuman
Copy link
Author

@jacobmoncur Yeah all my images are displayed after download but nope the default image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants