Skip to content

Commit 5064d57

Browse files
committed
添加indicator,并发布1.0.0版本
1 parent 552748b commit 5064d57

File tree

4 files changed

+51
-10
lines changed

4 files changed

+51
-10
lines changed

README.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,17 @@ allprojects {
3131

3232
```
3333
dependencies {
34-
compile 'com.github.hanhailong:GridPagerSnapHelper:0.0.3'
34+
compile 'com.github.hanhailong:GridPagerSnapHelper:1.0.0'
3535
}
3636
```
3737

3838
## Jcenter(Recommend)
3939

4040
```
41-
compile 'com.hhl:gridpagersnaphelper:0.0.3'
41+
compile 'com.hhl:gridpagersnaphelper:1.0.0'
42+
43+
// Optional , config indicator
44+
compile 'com.hhl:recyclerviewindicator:1.0.0'
4245
```
4346

4447
## Maven
@@ -47,7 +50,16 @@ dependencies {
4750
<dependency>
4851
<groupId>com.hhl</groupId>
4952
<artifactId>gridpagersnaphelper</artifactId>
50-
<version>0.0.3</version>
53+
<version>1.0.0</version>
54+
<type>pom</type>
55+
</dependency>
56+
57+
// Optional , config indicator
58+
59+
<dependency>
60+
<groupId>com.hhl</groupId>
61+
<artifactId>recyclerviewindicator</artifactId>
62+
<version>1.0.0</version>
5163
<type>pom</type>
5264
</dependency>
5365
```
@@ -136,6 +148,27 @@ Here,I have provided three transform order functions
136148

137149
You can impl your custom row funcitons by extends **AbsRowDataTransform**
138150

151+
**Step4. (Optional) Config Indicator**
152+
```
153+
CirclePageIndicator indicator = (CirclePageIndicator) findViewById(R.id.first_page_indicator);
154+
indicator.setRecyclerView(firstRV);
155+
//Note: pageColumn must be config
156+
indicator.setPageColumn(column);
157+
158+
indicator.setOnPageChangeListener(new OnPageChangeListener() {
159+
@Override
160+
public void onPageSelected(int position) {
161+
162+
}
163+
164+
@Override
165+
public void onPageScrollStateChanged(int state) {
166+
167+
}
168+
});
169+
```
170+
171+
139172
# Why use AbsRowDataTransform?
140173

141174
In general,horizontal direction GridLayoutManager layout like this:
@@ -149,10 +182,6 @@ But,We want is the following case :
149182
so,We need to make a transformation of the data.Here,**AbsRowDataTransform** can meet your needs.
150183

151184

152-
# TODO
153-
154-
1. add indicator function
155-
156185
# Author
157186

158187
hanhailong worked in 58同城,A fantastic website

app/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ dependencies {
3030
compile 'com.android.support:recyclerview-v7:25.3.1'
3131
compile 'com.android.support:support-v4:25.3.1'
3232

33-
compile project(':gridpagersnaphelper')
33+
// compile project(':gridpagersnaphelper')
3434

3535
compile 'com.github.bumptech.glide:glide:4.0.0'
3636
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0'
3737

3838
// compile 'com.github.hanhailong:GridPagerSnapHelper:0.0.2'
3939

40-
// compile 'com.hhl:gridpagersnaphelper:0.0.3'
40+
compile 'com.hhl:gridpagersnaphelper:1.0.0'
4141

4242
compile project(':recyclerviewindicator')
43+
44+
// compile 'com.hhl:recyclerviewindicator:1.0.0'
4345
}

gridpagersnaphelper/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ publish {
3737
userOrg = 'hanhailong'
3838
groupId = 'com.hhl'
3939
artifactId = 'gridpagersnaphelper'
40-
publishVersion = '0.0.3'
40+
publishVersion = '1.0.0'
4141
desc = 'A powerful tools to impl grid paging layout by RecyclerView'
4242
website = 'https://github.com/hanhailong/GridPagerSnapHelper'
4343
}

recyclerviewindicator/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.novoda.bintray-release'
23

34
android {
45
compileSdkVersion 25
@@ -31,3 +32,12 @@ dependencies {
3132

3233
compile 'com.android.support:recyclerview-v7:25.3.1'
3334
}
35+
36+
publish {
37+
userOrg = 'hanhailong'
38+
groupId = 'com.hhl'
39+
artifactId = 'recyclerviewindicator'
40+
publishVersion = '1.0.0'
41+
desc = 'A indicator for gridpagersnaphelper'
42+
website = 'https://github.com/hanhailong/GridPagerSnapHelper'
43+
}

0 commit comments

Comments
 (0)