Azizur Rehman
Azizur Rehman

Reputation: 2143

How to add images in frescoimageviewer

I am trying to use

com.github.stfalcon:frescoimageviewer:0.5.0

to show images from sdcard. Here, is the code which i am using

new ImageViewer.Builder<>(MyImagesActivity.this, 
                     imgs) // what is this?
                    .setStartPosition(i)
                    .show();

The problem is I can't figure out what is the second parameter(imgs). The doc suggests that it is a list or String[]. But I don't know what it is. Is there anyone who has used this library. Any suggestion might be highly appreciated.

Upvotes: 1

Views: 1522

Answers (1)

Sebastian
Sebastian

Reputation: 417

You can pass Urls or Uris of the images as Objects[] or List.....

for Example...

 String[] a={"https://viralsweep.com/blog/wp-content/uploads/2015/02/unsplash.jpg","http://cdn.mos.techradar.com/art/other/Beach-970-80.jpg"};

            Fresco.initialize(MainActivity.this);
            new ImageViewer.Builder(MainActivity.this, a).setStartPosition(position).show();

This also help you

Upvotes: 2

Related Questions