Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dongjunkun/BannerLayout
一款简洁实用的android广告栏
https://github.com/dongjunkun/BannerLayout
android banner dongjunkun
Last synced: 3 months ago
JSON representation
一款简洁实用的android广告栏
- Host: GitHub
- URL: https://github.com/dongjunkun/BannerLayout
- Owner: dongjunkun
- Created: 2015-12-19T08:50:14.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-14T07:59:04.000Z (over 7 years ago)
- Last Synced: 2024-06-16T06:33:53.036Z (5 months ago)
- Topics: android, banner, dongjunkun
- Language: Java
- Homepage: http://www.jianshu.com/p/bf3bc1f2df5c
- Size: 4.88 MB
- Stars: 355
- Watchers: 19
- Forks: 110
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-android-ui - BannerLayout - 简洁实用的android广告栏 (轮播图)
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)结合自己的理解而成
### 预览
或者扫描二维码下载
## 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)