Skip to content

A banner view implemented by using rxJava2 for android

Notifications You must be signed in to change notification settings

tata88k/banner-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

BannerView

A rxJava2 + ViewPager banner view for android. Automatically plays images and stops when on touching

Download

Setup

compile 'com.github.thepacific:banner:0.0.1'

XML

<com.pacific.banner.BannerView
        android:id="@+id/banner"
        android:layout_width="match_parent"
        android:layout_height="170dp"
        app:news_icon=""
        app:news_text=""
        app:news_mask_color=""
        app:show_news_icon="true|false" >
</com.pacific.banner.BannerView>

<declare-styleable name="BannerView">
        <attr name="show_news_icon" format="boolean" />
        <attr name="news_mask_color" format="reference" />
        <attr name="news_icon" format="reference" />
        <attr name="news_text" format="string" />
</declare-styleable>

Java

        bannerView.setImageLoader(ImageLoader loader);

        bannerView.setOnPhotoClickListener(View.OnClickListener listener);

        bannerView.addAll(List< Photo > list);

        bannerView.remove(Photo photo);

        bannerView.add(Photo photo);

        bannerView.replace(int index, Photo photo);

        bannerView.replaceAll(List<Photo> list);

        bannerView.setNewsText(@StringRes int resId);

        bannerView.setNewsText(String str);

        bannerView.setIconImageResource(@DrawableRes int resId);

        bannerView.setIconImageResource(@NonNull Drawable drawable);

        bannerView.setMaskColor(int color);

        bannerView.setMaskBackgroundResource(@DrawableRes int resId);

        bannerView.setMaskBackground(Drawable drawable);

License

The MIT License

About

A banner view implemented by using rxJava2 for android

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages