Skip to content

Commit da7a42b

Browse files
committed
更新readme
1 parent ec1f86f commit da7a42b

File tree

1 file changed

+17
-105
lines changed

1 file changed

+17
-105
lines changed

README.md

Lines changed: 17 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,25 @@
1-
# Android Image Slider [![Build Status](https://travis-ci.org/daimajia/AndroidImageSlider.svg)](https://travis-ci.org/daimajia/AndroidImageSlider)
1+
# AndroidImageSlider
22

3-
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/daimajia/AndroidImageSlider?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4-
5-
This is an amazing image slider for the Android platform. I decided to open source this because there is really not an attractive, convenient slider widget in Android.
6-
7-
You can easily load images from an internet URL, drawable, or file. And there are many kinds of amazing animations you can choose. :-D
8-
9-
## Demo
10-
11-
![](http://ww3.sinaimg.cn/mw690/610dc034jw1egzor66ojdg20950fknpe.gif)
3+
修改自AndroidImageSlider
4+
https://github.com/daimajia/AndroidImageSlider
125

13-
[Download Apk](https://github.com/daimajia/AndroidImageSlider/releases/download/v1.0.8/demo-1.0.8.apk)
14-
15-
## Usage
6+
使用glide加载的AndroidImageSlider
7+
具体使用方法参照上方网址
168

17-
### Step 1
189

19-
#### Gradle
2010

21-
```groovy
22-
dependencies {
23-
compile "com.android.support:support-v4:+"
24-
compile 'com.squareup.picasso:picasso:2.3.2'
25-
compile 'com.nineoldandroids:library:2.4.0'
26-
compile 'com.daimajia.slider:library:1.1.5@aar'
27-
}
28-
```
11+
远程依赖方法在项目根目录下的build.gradle添加如下
12+
allprojects {
13+
repositories {
14+
...
15+
<!--添加的话,就这一句-->
16+
maven { url "https://jitpack.io" }
17+
}
18+
}
2919

3020

31-
#### Maven
21+
在引用项目处添加
22+
dependencies {
23+
compile 'com.github.a243981326:YzsLib:0.0.2'
24+
}
3225

33-
```xml
34-
<dependency>
35-
<groupId>com.squareup.picasso</groupId>
36-
<artifactId>picasso</artifactId>
37-
<version>2.3.2</version>
38-
</dependency>
39-
<dependency>
40-
<groupId>com.nineoldandroids</groupId>
41-
<artifactId>library</artifactId>
42-
<version>2.4.0</version>
43-
</dependency>
44-
<dependency>
45-
<groupId>com.daimajia.slider</groupId>
46-
<artifactId>library</artifactId>
47-
<version>1.1.2</version>
48-
<type>apklib</type>
49-
</dependency>
50-
```
51-
52-
#### Eclipse
53-
54-
For Eclipse users, I provided a sample project which orgnized as Eclipse way. You can download it from [here](https://github.com/daimajia/AndroidImageSlider/releases/download/v1.0.9/AndroidImageSlider-Eclipse.zip), and make some changes to fit your project.
55-
56-
Notice: It's the version of 1.0.9, it may not update any more. You can update manually by yourself.
57-
58-
### Step 2
59-
60-
Add permissions (if necessary) to your `AndroidManifest.xml`
61-
62-
```xml
63-
<!-- if you want to load images from the internet -->
64-
<uses-permission android:name="android.permission.INTERNET" />
65-
66-
<!-- if you want to load images from a file OR from the internet -->
67-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
68-
```
69-
70-
**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.
71-
72-
If you want to load images from drawable, then no additional permissions are necessary.
73-
74-
### Step 3
75-
76-
Add the Slider to your layout:
77-
78-
```java
79-
<com.daimajia.slider.library.SliderLayout
80-
android:id="@+id/slider"
81-
android:layout_width="match_parent"
82-
android:layout_height="200dp"
83-
/>
84-
```
85-
86-
There are some default indicators. If you want to use a provided indicator:
87-
88-
```java
89-
<com.daimajia.slider.library.Indicators.PagerIndicator
90-
android:id="@+id/custom_indicator"
91-
android:layout_width="wrap_content"
92-
android:layout_height="wrap_content"
93-
android:gravity="center"
94-
/>
95-
```
96-
97-
[Code example](https://github.com/daimajia/AndroidImageSlider/blob/master/demo%2Fsrc%2Fmain%2Fjava%2Fcom%2Fdaimajia%2Fslider%2Fdemo%2FMainActivity.java)
98-
99-
====
100-
101-
## Advanced usage
102-
103-
Please visit [Wiki](https://github.com/daimajia/AndroidImageSlider/wiki)
104-
105-
## Thanks
106-
107-
- [Picasso](https://github.com/square/picasso)
108-
- [NineOldAndroids](https://github.com/JakeWharton/NineOldAndroids)
109-
- [ViewPagerTransforms](https://github.com/ToxicBakery/ViewPagerTransforms)
110-
111-
##About me
112-
113-
I am a student in mainland China. I love Google, love Android, love everything that is interesting. If you get any problems when using this library or you have an internship opportunity, please feel free to [email me](mailto:daimajia@gmail.com). :smiley:

0 commit comments

Comments
 (0)