StoriesProgressView icon indicating copy to clipboard operation
StoriesProgressView copied to clipboard

StoriesProgressView using urls

Open vinc4 opened this issue 8 years ago • 23 comments

how do i load images using urls not drawables

vinc4 avatar Nov 07 '17 07:11 vinc4

can't ....

shts avatar Nov 22 '17 08:11 shts

Even videos ??

On 22 Nov 2017 10:35, "Shota Saito" [email protected] wrote:

can't ....

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shts/StoriesProgressView/issues/7#issuecomment-346279466, or mute the thread https://github.com/notifications/unsubscribe-auth/AYLV_TM2w6Rusg3wIEdPsmeMHgVEpShtks5s49zQgaJpZM4QUXjy .

vinc4 avatar Nov 22 '17 08:11 vinc4

Oh, Are you referring to sample code ?? I'm afraid, Please check it yourself for non-StoriesProgressView.

shts avatar Nov 22 '17 08:11 shts

I want a story view with images and videos like what's aap

On 22 Nov 2017 10:59, "Shota Saito" [email protected] wrote:

Oh, Are you referring to sample code ?? I'm afraid, Please check it yourself for non-StoriesProgressView.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shts/StoriesProgressView/issues/7#issuecomment-346285362, or mute the thread https://github.com/notifications/unsubscribe-auth/AYLV_XSgREHrjrCrlJ6MwYinnQ16rUOkks5s4-JugaJpZM4QUXjy .

vinc4 avatar Nov 22 '17 09:11 vinc4

could be very cool if a can't use this library with Glide or Picasso to load images or videos like instagram, facebook, whatsapp... I really like this library, but can't to use for my purpose, because I need load the images from the server..

jjimenez0611 avatar Jun 23 '18 00:06 jjimenez0611

You can load images from a server. Use a single void method to make glide update your image view and progress the story.

On Sat, 23 Jun 2018 at 10:46 am, Jose Jimenez [email protected] wrote:

could be very cool if a can't use this library with Glide or Picasso to load images or videos like instagram, facebook, whatsapp... I really like this library, but can't to use for my purpose, because I need load the images from the server..

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/shts/StoriesProgressView/issues/7#issuecomment-399617107, or mute the thread https://github.com/notifications/unsubscribe-auth/AIgngmxPKH0JaNkg1Hg0u1WO7Ac5tyKUks5t_Y_zgaJpZM4QUXjy .

-- Regards Brandon Stillitano Project Manager 0401 007 904 javascript:void(0);

ghost avatar Jun 23 '18 00:06 ghost

@Xenero Hi

You say that I can call a single method with Glide implementation, and call this method in the onNext and onPreview?

for example:

@Override onNext(){ GlideApp .with(myFragment) .load(url) .centerCrop() .placeholder(R.drawable.loading_spinner) .into(myImageView); }

something like that.....

jjimenez0611 avatar Jun 23 '18 00:06 jjimenez0611

Not really. You’d have a method Like:

void methodName() { Glide.with.load...... storyView.skip(); }

On Sat, 23 Jun 2018 at 10:55 am, Jose Jimenez [email protected] wrote:

@Xenero https://github.com/Xenero Hi

You say that I can call a single method with Glide implementation, and call this method in the onNext and onPreview?

for example:

@override https://github.com/override onNext(){ GlideApp .with(myFragment) .load(url) .centerCrop() .placeholder(R.drawable.loading_spinner) .into(myImageView); }

something like that.....

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/shts/StoriesProgressView/issues/7#issuecomment-399617778, or mute the thread https://github.com/notifications/unsubscribe-auth/AIgngv-iyI-k85TPgmClbNKdQEyzJTkCks5t_ZIWgaJpZM4QUXjy .

-- Regards Brandon Stillitano Project Manager 0401 007 904 javascript:void(0);

ghost avatar Jun 23 '18 00:06 ghost

@Xenero

mmmm I will try... it is not very clear to me yet... Because, how to set the image from glide to the storyview?

for example If I receive from the server 4 images, I have to wait for all the images to download and then set to the storyView?

Sorry for my english.. And sorry for all the questions...

jjimenez0611 avatar Jun 23 '18 01:06 jjimenez0611

@Xenero Thanks

I understand...

I can do it.. thank for the idea. 👍

jjimenez0611 avatar Jun 23 '18 01:06 jjimenez0611

can you share the code please jimenez? thanks!

ProMadGenius avatar Jul 06 '18 23:07 ProMadGenius

Hello, i m new to android development, currently i m developing instagram clone with firebase. i have seen your demo but the issue is i am unable to set images, which i fetch from the firebase as i see in your demo you just use the static path of images stored in array and show in storyprogress view.

milanbhuva avatar Jul 12 '18 06:07 milanbhuva

Hi @ProMadGenius

I have some problems with the onPause with this library, I try to fix it but can't...

Finally I use another library of segment progress bar to Android, is more simple and it doesn't has listeners to know when a segment finish.. So I download the code of the library and modify to add the listener that I needed..

And then I use glide to know when the resource is ready and start the segment and add the listener to know when the segment is finish and past to the next image..

The name of this library is Segmented progress bar... Maybe you can see is very easy to understand..

jjimenez0611 avatar Jul 12 '18 23:07 jjimenez0611

Yes i watched that library... can i sent you a email? so u can help me a bit? :'v I will love that. Thanks for your response anyway, have nice day.

ProMadGenius avatar Jul 13 '18 18:07 ProMadGenius

@ProMadGenius sure not problem send me a message... [email protected]

jjimenez0611 avatar Jul 13 '18 18:07 jjimenez0611

i wanna start time duration when image is successfully loaded into imageView , how i can achieve this ??

i tried to use handler i.e. after 5 second handler will call skip() method , but it not working. even , if u not use storiesProgressView.setStoryDuration(5000L) method you wont be able to call skip method.

thank you

here is my code

private void loadImageFromPicasso(String url) {

        Log.d(TAG,"picasso loading url = "+url);

        pb.setVisibility(View.VISIBLE);
        Picasso.get().load(url).placeholder(R.color.gray).into(image, new Callback() {
            @Override
            public void onSuccess() {
                Log.d(TAG,"picasso success");
                pb.setVisibility(View.INVISIBLE);
                //storiesProgressView.setStoryDuration(5000L);

                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        storiesProgressView.skip();
                    }
                },5000);
            }

            @Override
            public void onError(Exception e) {
                pb.setVisibility(View.INVISIBLE);
                //storiesProgressView.setStoryDuration(null);
                Log.d(TAG,"picasso error");
            }
        });
    }

pritesh25 avatar Aug 22 '18 12:08 pritesh25

@pritesh25 Try new Handler(Looper.getMainLooper())

shts avatar Aug 22 '18 14:08 shts

@shts i want to start progressbar when image loaded from network to imageview [im using picasso].before loading image from network into imageview should be paused.once image successfully loaded into imageview then progressbar should start. how i can achieve this ? is there any method ? thank you

pritesh25 avatar Aug 24 '18 04:08 pritesh25

@pritesh25 did you find solution?

yoonusc avatar Dec 10 '18 07:12 yoonusc

Using it with Glide: write a method for glide, then call start ProgressBar.

    private void updateImageView(){
        spinner.setVisibility(View.VISIBLE);
        String imageurl = resources[counter];
        Glide.with(getActivity())
                .load(imageurl)
                .apply(glideRequestOptions)
                //.transition(withCrossFade())
                .listener(new RequestListener<Drawable>() {
                    @Override
                    public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
                        startProgressView();
                        return false;
                    }

                    @Override
                    public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
                        startProgressView();
                        return false;
                    }
                })
                .into(imageView)

        ;

    }

    private void startProgressView(){
        spinner.setVisibility(View.GONE);
        storiesProgressView.destroy();
        storiesProgressView.startStories(counter);
    }

           @Override
            public void onNext() {
                Log.d("STORY next", "" + counter);
                if (counter>resources.length-1) return;
                counter++;
                updateImageView();
            }

            @Override
            public void onPrev() {
                Log.d("STORY prev", "" + counter);
                if ((counter - 1) < 0) return;
                counter--;
                updateImageView();

            }

            @Override
            public void onComplete() {
                Log.d("STORY compl", "" + counter);

            }

uzman avatar Dec 25 '18 11:12 uzman

Does this library working with server images?

simrankathuria avatar May 31 '19 07:05 simrankathuria

Yes, you can show server images with GLIDE

jjimenez0611 avatar May 31 '19 16:05 jjimenez0611

Yes, you can show server images with GLIDE

Can you help me with the code how you are using it .Thanks in Advance.

dinesh750 avatar Jul 12 '19 12:07 dinesh750