Giter Site home page Giter Site logo

android-image-indicator's Introduction

android-image-indicator

Android image indicator for advertise and user guide(network image support).

####1、Advertise mode(auto play if need) in layout file:

<com.allthelucky.common.view.ImageIndicatorView
android:id="@+id/indicate_view"
android:layout_width="match_parent"
android:layout_height="160dp" />

in java setting:

imageIndicatorView = (ImageIndicatorView) findViewById(R.id.indicate_view);
final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher };
imageIndicatorView.setupLayoutByDrawable(resArray);
imageIndicatorView.setIndicateStyle(ImageIndicatorView.INDICATE_ARROW_ROUND_STYLE);
imageIndicatorView.show();

set auto play if need:

AutoPlayManager autoBrocastManager =  new AutoPlayManager(imageIndicatorView);
autoBrocastManager.setBroadcastEnable(true);
autoBrocastManager.setBroadCastTimes(5);//loop times
autoBrocastManager.setBroadcastTimeIntevel(3 * 1000, 3 * 1000);//set first play time and interval
autoBrocastManager.loop();

ScreenShot

####2、User guide mode

this.imageIndicatorView = (ImageIndicatorView) findViewById(R.id.guide_indicate_view);
final Integer[] resArray = new Integer[] { R.drawable.ic_launcher, R.drawable.ic_launcher };
imageIndicatorView.setupLayoutByDrawable(resArray);
imageIndicatorView.setIndicateStyle(ImageIndicatorView.INDICATE_USERGUIDE_STYLE);
imageIndicatorView.show();

ScreenShot
ScreenShot

####3、NetworkImageIndicatorView(image from network)

layout file:

<com.allthelucky.common.view.network.NetworkImageIndicatorView
android:id="@+id/network_indicate_view"
android:layout_width="match_parent"
android:layout_height="160dp" />

in java setting:

final List<String> urlList= new ArrayList<String>();
urlList.add("https://github.com/panxw/android-image-indicator/blob/master/AndroidImageIndicatorSample/screenshot/guider_00.jpg");
urlList.add("https://github.com/panxw/android-image-indicator/blob/master/AndroidImageIndicatorSample/screenshot/guider_01.jpg");
imageIndicatorView = (ImageIndicatorView) findViewById(R.id.network_indicate_view);
imageIndicatorView.setupLayoutByImageUrl(urlList);
imageIndicatorView.show();

set auto play if need:

AutoPlayManager autoBrocastManager =  new AutoPlayManager(imageIndicatorView);
autoBrocastManager.setBroadcastEnable(true);
autoBrocastManager.setBroadCastTimes(5);//loop times
autoBrocastManager.setBroadcastTimeIntevel(3 * 1000, 3 * 1000);//set first play time and interval
autoBrocastManager.loop();

NetworkImageIndicatorView need network support, please view AndroidImageIndicatorSample first.

####Third party library Android Volley Manager(base on official Volley): https://github.com/panxw/android-volley-manager

android-image-indicator's People

Contributors

panxw avatar

Watchers

 avatar

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.