Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dongjunkun/BannerLayout

一款简洁实用的android广告栏
https://github.com/dongjunkun/BannerLayout

android banner dongjunkun

Last synced: 3 months ago
JSON representation

一款简洁实用的android广告栏

Awesome Lists containing this project

README

        

[![](https://jitpack.io/v/dongjunkun/BannerLayout.svg)](https://jitpack.io/#dongjunkun/BannerLayout)

一款简洁实用的android广告栏,参考了[AndroidImageSlider](https://github.com/daimajia/AndroidImageSlider)和[BGABanner-Android](https://github.com/bingoogolapple/BGABanner-Android)结合自己的理解而成

### 预览

DownLoad APK

或者扫描二维码下载

## Gradle Dependency
```
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}

dependencies {
compile 'com.github.dongjunkun:BannerLayout:1.0.6'
}

```

### 使用
**xml**
```

```

**代码中使用**
```
//网络地址
bannerLayout.setViewUrls(urls);

//设置加载器
bannerLayout.setImageLoader(new GlideImageLoader());

//添加点击监听
bannerLayout.setOnBannerItemClickListener(new BannerLayout.OnBannerItemClickListener() {
@Override
public void onItemClick(int position) {
Toast.makeText(MainActivity.this, String.valueOf(position), Toast.LENGTH_SHORT).show();
}
});
```

### 关于我
简书:[dongjunkun](http://www.jianshu.com/users/f07458c1a8f3/latest_articles)