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

How to show upload & download progress for Images,Videos ? #109

Open
satnamvision opened this issue Nov 8, 2017 · 4 comments
Open

How to show upload & download progress for Images,Videos ? #109

satnamvision opened this issue Nov 8, 2017 · 4 comments

Comments

@satnamvision
Copy link

how to show upload download progress or progress bar for the images,videos & other custom content types. I am using default implementation of messageAdapter with some custom content type using messageHolder. So my problem is show progress bar while a video/image file is getting upload on the server. Is there any that can help me with this or do i need to create custom Message Adapter?

@satnamvision satnamvision changed the title How to show uploading & downloading progress for Images,Videos ? How to show upload & download progress for Images,Videos ? Nov 8, 2017
@ChiHwe
Copy link

ChiHwe commented Nov 20, 2017

hi, you found way to upload video ? if yes, can show me how to do it ?

@tusharuit25
Copy link

I am struggling with same problem

@satnamvision
Copy link
Author

I don't think so. I am using firebase as backend. so I was purposing to change the sequences of operations for uploading & downloading file. I haven't implemented it yet but that was the only way I have found.

@ChrisLMills
Copy link

This may be seen as a hack, but this is how I handled it: (I'm also using Firebase)

ImageLoader imageLoader = new ImageLoader() {
@OverRide
public void loadImage(ImageView imageView, String url) {

            RelativeLayout imageParent = (RelativeLayout) imageView.getParent();

            ProgressBar spinner = new ProgressBar(getContext());
            spinner.setLayoutParams(new RelativeLayout.LayoutParams(
                    RelativeLayout.LayoutParams.MATCH_PARENT,
                    RelativeLayout.LayoutParams.MATCH_PARENT
                    ));
            spinner.setIndeterminate(true);

            imageParent.addView(spinner);

            //Ok, this is a hack. I couldn't get the onResourceReady method for Glide to work, at which
            //point I would have set the spinner to invisible. However, bringing the imageView to the
            //front seems to do the trick.
            imageView.bringToFront();

            imageView.getLayoutParams().width = RelativeLayout.LayoutParams.MATCH_PARENT;
            Glide.with(MessageListFragment.this).load(url).into(imageView);
        }
    };

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

4 participants