Skip to content

Commit

Permalink
update builder_example app
Browse files Browse the repository at this point in the history
  • Loading branch information
VEINHORN committed Feb 10, 2019
1 parent 47ef4d6 commit 6d3a235
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import android.os.Bundle;
import android.widget.Toast;

import com.veinhorn.scrollgalleryview.MediaInfo;
import com.veinhorn.scrollgalleryview.ScrollGalleryView;
import com.veinhorn.scrollgalleryview.builder.GallerySettings;
import com.veinhorn.scrollgalleryview.loader.picasso.PicassoImageLoader;

import static com.veinhorn.scrollgalleryview.loader.picasso.dsl.DSL.*;

Expand Down Expand Up @@ -38,11 +40,17 @@ public void onClick(int position) {
Toast.makeText(MainActivity.this, "image position = " + position, Toast.LENGTH_SHORT).show();
}
})
.add(images(
"http://pirate-islands.com/wp-content/uploads/2018/07/07_Dom-Fernando-II_01-636x310.jpg",
"http://povodu.ru/wp-content/uploads/2016/04/pochemu-korabl-derzitsa-na-vode.jpg"
))
.add(image("http://povodu.ru/wp-content/uploads/2016/04/pochemu-korabl-derzitsa-na-vode.jpg"))
.add(video("http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4", R.mipmap.default_video))
.add(image(
"https://i.pinimg.com/originals/1b/d3/f0/1bd3f0e146da86f9c504e89a0b7e1403.jpg",
"Old Ship"
))
.build();

galleryView.addMedia(MediaInfo.mediaLoader(
new PicassoImageLoader("https://upload.wikimedia.org/wikipedia/commons/thumb/8/81/USRC_Salmon_P_Chase_-_LoC_4a25817u.jpg/1200px-USRC_Salmon_P_Chase_-_LoC_4a25817u.jpg"),
"The word barque entered English via French, which in turn came from the Latin barca by way of Occitan, Catalan, Spanish or Italian."
));
}
}

0 comments on commit 6d3a235

Please sign in to comment.