Skip to content

Commit 5b2b46d

Browse files
committed
Merge pull request #10 from shekibobo/patch-1
Fix typos, add note about when to use permissions
2 parents b51a863 + 46642f5 commit 5b2b46d

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

README.md

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

3-
This is an amazing image slider in Android platform. I decide to open source this because there is really not an attractive, and convenient slide widget in Android.
3+
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.
44

5-
You can easily load image from net, drawable or file. And there are many kind of amazing animations you can choose. :-D
5+
You can easily load images from an internet URL, drawable, or file. And there are many kinds of amazing animations you can choose. :-D
66

7-
##Demo
7+
## Demo
88

99
![](http://ww3.sinaimg.cn/mw690/610dc034jw1egzor66ojdg20950fknpe.gif)
1010

1111
[Download Apk](http://jmp.sh/K3mBLCy)
1212

13-
##Usage
13+
## Usage
1414

15-
Step1:
15+
### Step 1
1616

17-
If you are using Android Studio, just add a one line code to your project root `build.gradle`.
17+
If you are using Android Studio, just add this line code to your project root `build.gradle`.
1818

1919
```groovy
20-
dependencies{
20+
dependencies {
2121
compile 'com.daimajia.slider:library:1.0.4@aar'
2222
}
2323
```
2424

2525

26-
If you are using maven to manage your project, add below to your `pom.xml`
26+
If you are using maven to manage your project, add the following to your `pom.xml`:
2727

2828
```xml
2929
<dependency>
@@ -34,14 +34,25 @@ If you are using maven to manage your project, add below to your `pom.xml`
3434
</dependency>
3535
```
3636

37-
Step2: add `storage` and `internet` permission.
37+
### Step 2
38+
39+
Add permissions (if necessary) to your `AndroidManifest.xml`
3840

3941
```xml
42+
<!-- if you want to load images from the internet -->
4043
<uses-permission android:name="android.permission.INTERNET" />
44+
45+
<!-- if you want to load images from a file OR from the internet -->
4146
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
4247
```
4348

44-
Step3: add layout in your xml.
49+
**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.
50+
51+
If you want to load images from drawable, then no additional permissions are necessary.
52+
53+
### Step 3
54+
55+
Add the Slider to your layout:
4556

4657
```java
4758
<com.daimajia.slider.library.SliderLayout
@@ -51,7 +62,7 @@ Step3: add layout in your xml.
5162
/>
5263
```
5364

54-
There are some default indicators, while, if you want to custom your own indicator:
65+
There are some default indicators. If you want to use a provided indicator:
5566

5667
```java
5768
<com.daimajia.slider.library.Indicators.PagerIndicator
@@ -66,10 +77,10 @@ There are some default indicators, while, if you want to custom your own indicat
6677

6778
====
6879

69-
##Advanced usage
80+
## Advanced usage
7081

7182
Please visit [Wiki](https://github.com/daimajia/AndroidImageSlider/wiki)
7283

7384
##About me
7485

75-
A student in China mainland. 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 relax to [email me](mailto:[email protected]). :-D
86+
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:[email protected]). :smiley:

0 commit comments

Comments
 (0)