Giter Site home page Giter Site logo

jeancsanchez / photoviewslider Goto Github PK

View Code? Open in Web Editor NEW
79.0 4.0 18.0 1.76 MB

:camera: A simple photo browser for Android applications.

License: Apache License 2.0

Java 100.00%
photo photo-browser android android-applications animations library ui images java

photoviewslider's Introduction

PhotoViewSlider

Download Version Codacy Badge
A simple photo browser for Android applications.

Gradle Dependency

dependencies {
    // ... other dependencies
    compile 'io.github.jeancsanchez.photoviewslider:photoviewslider:1.2.0'
}

Maven

<dependency>
  <groupId>io.github.jeancsanchez.photoviewslider</groupId>
  <artifactId>photoviewslider</artifactId>
  <version>1.2.0</version>
  <type>pom</type>
</dependency>

Getting Started

You only need a PhotosViewSlider on your Layout Activity.

<br.com.jeancsanchez.photoviewslider.PhotosViewSlider
        android:id="@+id/photosViewSlider"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

Code Setup

Setup the view on your Activity

photoViewSlider = (PhotosViewSlider) findViewById(R.id.photosViewSlider);

Option 1: Set the urls on demand and initialize the photo view.

photoViewSlider.setPhotoUrl("http://awesomeimg.com.br", "any description");
photoViewSlider.setPhotoUrl("http://awesomeimg.com.br");
photoViewSlider.initializePhotos();

Option 2: Create a list of String urls, so initialize the photo view.

stringsList = new ArrayList<>();

stringsList.add("http://awesomeimg.com.br");
stringsList.add("http://awesomeimg.com.br");
photoViewSlider.initializePhotosUrls(stringsList);

Option 3: Create a list of Photo objects and set the values to it, so initialize the photo view .

photoList = new ArrayList<>();

Photo photo1 = new Photo();
photo1.setImage("http://modmyi.com/attachments/forums/iphone-4-4s-new-skins-themes-launches/555329d1322802429-ice-cream-sandwich-android-4-0-a-android_ice_cream_sandwich_electronic_bytes.png");
photo1.setDescription("Android  Ice Cream Sandwich");

Photo photo2 = new Photo();
photo2.setImage("http://cdn.gigjets.com/wp-content/uploads/2012/10/Android-Jelly-Bean-Logo-Sort-Of.jpg");
photo2.setDescription("Android Jelly Bean");

photoList.add(photo1);
photoList.add(photo2);

photoViewSlider.initializePhotos(photosList);

Change transition animation (Optional)

photoViewSlider.setTechniqueAnimation(Techniques.BounceIn);

TO DO LIST

  • Make the recycler view "responsive"

Thanks

photoviewslider's People

Contributors

codacy-badger avatar jeancsanchez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

photoviewslider's Issues

How to get selected photo?

Hey there Jean,

Thanks for the library, it's pretty cool.

Is there a way to know which photo was selected by the user? I tap on the image, it gets focus on screen but I'd like now to either display a button in there so the user can use the photo or somehow find out which photo was selected.

Is this possible?

Thanks!

using offline photos

hello,
i'm trying to use offline photos ( from project res or device storage ) in the slider?
is that possible?
I would appreciate any help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.