图片轮播--AndroidImageSlider
来源:互联网 发布:中国投资咨询公司 知乎 编辑:程序博客网 时间:2024/06/06 17:43
Demo
Download Apk
Usage
Step 1
Gradle
dependencies { compile "com.android.support:support-v4:+" compile 'com.squareup.picasso:picasso:2.3.2' compile 'com.nineoldandroids:library:2.4.0' compile 'com.daimajia.slider:library:1.1.5@aar'}
Maven
<dependency> <groupId>com.squareup.picasso</groupId> <artifactId>picasso</artifactId> <version>2.3.2</version></dependency><dependency> <groupId>com.nineoldandroids</groupId> <artifactId>library</artifactId> <version>2.4.0</version></dependency><dependency> <groupId>com.daimajia.slider</groupId> <artifactId>library</artifactId> <version>1.1.2</version> <type>apklib</type></dependency>
Eclipse
For Eclipse users, I provided a sample project which orgnized as Eclipse way. You can download it from here, and make some changes to fit your project.
Notice: It's the version of 1.0.9, it may not update any more. You can update manually by yourself.
Step 2
Add permissions (if necessary) to your AndroidManifest.xml
<!-- if you want to load images from the internet --><uses-permission android:name="android.permission.INTERNET" /> <!-- if you want to load images from a file OR from the internet --><uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Note: If you want to load images from the internet, you need both the INTERNET
and READ_EXTERNAL_STORAGE
permissions to allow files from the internet to be cached into local storage.
If you want to load images from drawable, then no additional permissions are necessary.
Step 3
Add the Slider to your layout:
<com.daimajia.slider.library.SliderLayout android:id="@+id/slider" android:layout_width="match_parent" android:layout_height="200dp"/>
There are some default indicators. If you want to use a provided indicator:
<com.daimajia.slider.library.Indicators.PagerIndicator android:id="@+id/custom_indicator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" />
- 图片轮播--AndroidImageSlider
- daimajia/AndroidImageSlider图片轮播总结
- 酷炫的图片轮播框架AndroidImageSlider
- android一键实现图片轮播(AndroidImageSlider)
- 使用AndroidImageSlider实现轮播
- 好用的AndroidImageSlider图片自动轮播器
- AndroidImageSlider 滚动图片 viewpager
- 仿商城应用中的广告(无限轮播)实现原理,例AndroidImageSlider
- AndroidImageSlider 酷炫自动轮播广告
- Android 图片切换特效 AndroidImageSlider
- AndroidImageSlider Android 图片滚动框架
- AndroidImageSlider
- 5.轮播广告AndroidImageSlider的使用(包括自定义indicator,和sliderview的点击监听事件,架构分析)
- 封装好的图片滑动框架(AndroidImageSlider)
- 图片轮播
- 腾讯图片轮播
- js图片轮播
- js图片轮播
- Vue2传递信息汇总
- 后台:nodejs 前台:vue 全栈开发 完整功能的外卖平台系统
- 自学Java之Java编程(读写RSS Feed)(019day)
- 图片选择器--AndroidImagePicker
- ORACLE 12C 安装过程相关报错及解决方案
- 图片轮播--AndroidImageSlider
- android--自定义view
- 为什么不能直接在BroadCastReceiver中开一个线程执行耗时任务
- LintCode 解题记录 Array 17.6.5
- 更改nginx网站根目录
- ACM:F: ACM小组的成绩排名
- 自学Java之Java编程(XML Web服务)(020day)
- Linux 内核源码(kernel source)
- 位运算实现加减乘除