Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Merge branch 'feature/range_update' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
longerian committed Jan 30, 2018
2 parents 02bb0bc + fda15d2 commit b9c8a05
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 175 deletions.
6 changes: 3 additions & 3 deletions README-ch.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ VirtualLayout是一个针对RecyclerView的LayoutManager扩展, 主要提供一

## 使用

版本请参考mvn repository上的最新版本(目前最新版本是1.2.6),最新的 aar 都会发布到 jcenter 和 MavenCentral 上,确保配置了这两个仓库源,然后引入aar依赖:
版本请参考 [release 说明](https://github.com/alibaba/vlayout/releases)里的最新版本,最新的 aar 都会发布到 jcenter 和 MavenCentral 上,确保配置了这两个仓库源,然后引入aar依赖:

``` gradle
compile ('com.alibaba.android:vlayout:1.2.6@aar') {
compile ('com.alibaba.android:vlayout:1.2.8@aar') {
transitive = true
}
```
Expand All @@ -56,7 +56,7 @@ pom.xml
<dependency>
<groupId>com.alibaba.android</groupId>
<artifactId>vlayout</artifactId>
<version>1.2.6</version>
<version>1.2.8</version>
<type>aar</type>
</dependency>
```
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ By providing a custom LayoutManager to RecyclerView, VirtualLayout is able to la

### Import Library

Please find the latest version(1.2.6 so far) in maven repository. The newest version has been upload to jcenter and MavenCentral, make sure you have added at least one of these repositories.
Please find the latest version in [release notes](https://github.com/alibaba/vlayout/releases). The newest version has been upload to jcenter and MavenCentral, make sure you have added at least one of these repositories. As follow:

For gradle:
``` gradle
compile ('com.alibaba.android:vlayout:1.2.6@aar') {
compile ('com.alibaba.android:vlayout:1.2.8@aar') {
transitive = true
}
```
Expand All @@ -57,7 +57,7 @@ pom.xml
<dependency>
<groupId>com.alibaba.android</groupId>
<artifactId>vlayout</artifactId>
<version>1.2.6</version>
<version>1.2.8</version>
<type>aar</type>
</dependency>
```
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ VERSION=1
VERSION_NAME=1.2.6.4
PACKAGING_TYPE=aar
useNewSupportLibrary=true
systemProp.compileSdkVersion=23
systemProp.targetSdkVersion=23
systemProp.buildToolsVersion=23.0.2
systemProp.compileSdkVersion=25
systemProp.targetSdkVersion=25
systemProp.buildToolsVersion=25.0.3
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
39 changes: 33 additions & 6 deletions vlayout/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,41 @@

apply plugin: 'com.android.library'

buildscript {
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url "http://oss.jfrog.org/oss-snapshot-local/" }
mavenCentral()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}
}

repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url "http://oss.jfrog.org/oss-snapshot-local/" }
jcenter()
mavenLocal()
}


ext {
bintrayRepo = 'Tangram'
bintrayName = 'vlayout'

publishedGroupId = GROUP
libraryName = ARTIFACT
artifact = ARTIFACT
publishedGroupId = project.hasProperty('GROUP') ? GROUP : ''
libraryName = project.hasProperty('ARTIFACT') ? ARTIFACT : ''
artifact = project.hasProperty('ARTIFACT') ? ARTIFACT : ''

libraryDescription = 'Project vlayout is a powerfull LayoutManager extension for RecyclerView, it provides a group of layouts for RecyclerView. Make it able to handle a complicate situation when grid, list and other layouts in the same recyclerview.'

siteUrl = 'https://github.com/alibaba/vlayout'
gitUrl = 'https://github.com/alibaba/vlayout.git'

libraryVersion = VERSION_NAME
libraryVersion = project.hasProperty('VERSION_NAME') ? VERSION_NAME : ''

developerId = 'longerian'
developerName = 'longerian'
Expand Down Expand Up @@ -71,13 +92,19 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
}
}

lintOptions {
abortOnError false
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// compile project(':extension')
if (useNewSupportLibrary == true) {
if (project.hasProperty('useNewSupportLibrary')) {
compile 'com.android.support:recyclerview-v7:25.2.0@aar'
compile('com.android.support:support-v4:25.2.0@aar')
compile 'com.android.support:support-annotations:25.2.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,18 +404,18 @@ private void recycleForPreLayout(RecyclerView.Recycler recycler, LayoutStateWrap
Span span = findSpan(position, child, false);
if (span != null) {
span.popEnd(orientationHelper);
helper.removeChildView(child);
recycler.recycleView(child);
}
helper.removeChildView(child);
recycler.recycleView(child);
} else {
LayoutParams lp = (LayoutParams) child.getLayoutParams();
int position = lp.getViewPosition();
Span span = findSpan(position, child, false);
if (span != null) {
span.popEnd(orientationHelper);
helper.removeChildView(child);
recycler.recycleView(child);
}
helper.removeChildView(child);
recycler.recycleView(child);
break;
}
}
Expand Down Expand Up @@ -1341,7 +1341,7 @@ int invalidateAfter(int position) {
}

int getSpan(int position) {
if (mData == null || position >= mData.length) {
if (mData == null || position >= mData.length || position < 0) {
return INVALID_SPAN_ID;
} else {
return mData[position];
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b9c8a05

Please sign in to comment.