All Projects → genius158 → simplebanner

genius158 / simplebanner

Licence: other
(最简单的广告轮播)the most simple banner

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to simplebanner

Banner
🔥🔥🔥Android Compose Banner!!! 安卓 Compose 版本的 Banner,欢迎大家体验!!!
Stars: ✭ 40 (+122.22%)
Mutual labels:  banner
campaign-manager
The Camapign Management UI for RTB4Free, the open source bidder / DSP.
Stars: ✭ 24 (+33.33%)
Mutual labels:  banner
ChannelFiles
Miscellaneous TFL/LL YouTube channel files.
Stars: ✭ 12 (-33.33%)
Mutual labels:  banner
AKGADWrapper
A wrapper for a UIViewController with a GADBannerView at the bottom
Stars: ✭ 55 (+205.56%)
Mutual labels:  banner
Crazy-Banner
custom banner editor script for Termux
Stars: ✭ 60 (+233.33%)
Mutual labels:  banner
banner
🚩 A simple and clean banner generator - Banners on the go. https://liyasthomas.github.io/banner
Stars: ✭ 161 (+794.44%)
Mutual labels:  banner
HTML5-Banners
HTML5 animated banner boilerplate. Built for Doubleclick & Sizmek ad management platforms.
Stars: ✭ 47 (+161.11%)
Mutual labels:  banner
node-banner
Easily integrate ASCII flavored banners to your CLI tool
Stars: ✭ 18 (+0%)
Mutual labels:  banner
student-api-graphql
A GraphQL Wrapper for Ellucian's Banner Student REST API
Stars: ✭ 19 (+5.56%)
Mutual labels:  banner
SRCarouselView
A carousel view that only uses two UIImageView to achieve infinite carousel.
Stars: ✭ 56 (+211.11%)
Mutual labels:  banner
PocketMine-Banners
Super Simple PHP based banner generating system
Stars: ✭ 19 (+5.56%)
Mutual labels:  banner
StackViewLayout
StackViewLayout is a slide card view
Stars: ✭ 24 (+33.33%)
Mutual labels:  banner
AutoScrollLoopViewPager
AutoScrollLoopViewPager, 无限轮播的Banner
Stars: ✭ 46 (+155.56%)
Mutual labels:  banner
SimpleSlider
A simple slider allows you to easily use.
Stars: ✭ 78 (+333.33%)
Mutual labels:  banner
LoopBanner
一个简单好用且超轻量的自动轮播控件,支持UI风格完全自定义
Stars: ✭ 56 (+211.11%)
Mutual labels:  banner
AndroidModule
Android 通用模块封装
Stars: ✭ 110 (+511.11%)
Mutual labels:  banner
react-banner
A dynamic banner/header component.
Stars: ✭ 25 (+38.89%)
Mutual labels:  banner
HouseAds2
A library ( V2 ) for cross promoting own apps within own apps - for Android
Stars: ✭ 23 (+27.78%)
Mutual labels:  banner
Banner
布局可xml定制任意布局的banner控件,不仅局限于图片轮播哦,轻松解决各种需求。Android广告图片轮播控件,支持无限循环和多种主题,可以灵活设置轮播样式、动画、轮播和切换时间、位置、图片加载框架 以及视频轮播等!
Stars: ✭ 35 (+94.44%)
Mutual labels:  banner
mac-ibm-notifications
macOS agent used to display custom notifications and alerts to the end user.
Stars: ✭ 206 (+1044.44%)
Mutual labels:  banner

simplebanner

GIF

原理

在adapter原来的数据的最前面插入最后面的元素,最后面同理,与viewpager那种size设置成无限相比,这样做性能相对更好,更节省内存。而size无限,单它的当前项为一个较大的数值,内部计算也会相应的增加计算压力。

gradle

how to use

    banner.resumeScroll();//回复
    banner.pauseScroll();//暂停
    
    banner.setInterval(5000);
    banner.setPageChangeDuration(500);
    banner.setBannerDataInit(new Banner.BannerDataInit<String>() {
        @Override
        public ImageView initImageView() {
            //设置图片加载的控件(如:Fresco 这里可以传入SimpleDraweeView)
             return (ImageView) getLayoutInflater().inflate(R.layout.imageview, null);
        }

        @Override
        public void initImgData(ImageView imageView, String imgPath) {
            //可在这里控制图片的加载,
            //ImageLoader.getInstance().displayImage(imgPath, imageView, options);
            //((SimpleDraweeView)imageView).setImageURI(Uri.parse(imgPath));
            }
        });
        banner.setDataSource(drawables);

        //----------------------indicator start------------------------------
        bannerIndicator = (BannerIndicator) findViewById(R.id.indicator);
        bannerIndicator.setIndicatorSource(
                ContextCompat.getDrawable(getBaseContext(), R.drawable.select_bg),//select
                ContextCompat.getDrawable(getBaseContext(), R.drawable.select_bg_no),//unselect
                50//widthAndHeight
        );
        banner.attachIndicator(bannerIndicator);
        //----------------------indicator end------------------------------

        banner.setOnBannerItemClickListener(new Banner.OnBannerItemClickListener() {
            @Override
            public void onItemClick(int position) {
                Toast.makeText(getBaseContext(), "position:" + position, Toast.LENGTH_SHORT).show();
            }
        });

LICENSE

Copyright 2016 yan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].