Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
h6ah4i committed Dec 16, 2018
2 parents bb7266d + c350a08 commit cbffd84
Show file tree
Hide file tree
Showing 243 changed files with 2,134 additions and 2,001 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ This RecyclerView extension library provides Google's Inbox app like swiping, Pl

[ ![Download](https://api.bintray.com/packages/h6ah4i/maven/android-advancedrecyclerview/images/download.svg) ](https://bintray.com/h6ah4i/maven/android-advancedrecyclerview/_latestVersion)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Advanced%20RecyclerView-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1432)
[![Method Count](https://img.shields.io/badge/Methods%20and%20size-core:%201718%20%7C%20deps:%2018297%20%7C%20233%20KB-e91e63.svg) ](http://www.methodscount.com/?lib=com.h6ah4i.android.widget.advrecyclerview%3Aadvrecyclerview%3A0.11.0)

---

Expand Down Expand Up @@ -36,18 +35,23 @@ Target platforms
Latest version
---

- Version 0.11.0 (October 29, 2017) ([RELEASE NOTES](./RELEASE-NOTES.md))
- Version 1.0.0 (December 16, 2018) ([RELEASE NOTES](./RELEASE-NOTES.md))


**Recent Breaking Change Info**

- **v0.11.0:**
- Since official support libraries have dropped support older API levels than v14, this library does also dropped support them since v0.11.0. If you still need to support API level v9, please continue to use v0.10.6.
- A new callback `onItemSwipeStarted()` is added to `SwipeableItemAdapter`. Users must invoke appropriate `notify*()` method in this method.
- A new callback `onItemDragStarted()` is added to `DraggableItemAdapter`. Users must invoke appropriate `notify*()` method in this method.
- A new callback `onItemDragFinished()` is added to `DraggableItemAdapter`. Users must invoke appropriate `notify*()` method in this method.
- **v1.0.0:**
- Migrated to AndroidX (Use **v0.11.0** instead if your project uses support libraries)
- `BaseWrapperAdapter`
- Removed some deprecated features
- `SwipeableItemConstants.REACTION_CAN_SWIPE_BOTH`
- `SwipeableItemConstants.REACTION_CAN_NOT_SWIPE_BOTH`
- `SwipeableItemConstants.REACTION_CAN_NOT_SWIPE_BOTH_WITH_RUBBER_BAND_EFFECT`
- New `DraggableItemState getDragState()` method added to the `DraggableItemViewHolder` interface
- New `SwipeableItemState getSwipeState()` method added to the `SwipeableItemViewHolder` interface
- New `ExpandableItemState getExpandState()` method added to the `ExpandableItemViewHolder` interface

- **v0.10.4:** `OnGroupExpandListener` and `OnGroupCollapseListener` takes `payload` parameter. (related: [issue #350](https://github.com/h6ah4i/android-advancedrecyclerview/issues/350))
:point_right: [Migration guide from v0.11.0 to v1.0.0](https://advancedrecyclerview.h6ah4i.com/migration/)


Getting started
Expand All @@ -57,9 +61,7 @@ This library is published on jCenter. Just add these lines to `build.gradle`.

```gradle
dependencies {
implementation ('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.11.0@aar'){
transitive=true
}
implementation 'com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:1.0.0'
}
```

Expand Down
20 changes: 20 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## 1.0.0
[Breaking changes]
- Migrated to AndroidX
- Removed some deprecated features
- `BaseWrapperAdapter`
- `SwipeableItemConstants.REACTION_CAN_SWIPE_BOTH`
- `SwipeableItemConstants.REACTION_CAN_NOT_SWIPE_BOTH`
- `SwipeableItemConstants.REACTION_CAN_NOT_SWIPE_BOTH_WITH_RUBBER_BAND_EFFECT`
- New `DraggableItemState getDragState()` method added to the `DraggableItemViewHolder` interface
- New `SwipeableItemState getSwipeState()` method added to the `SwipeableItemViewHolder` interface
- New `ExpandableItemState getExpandState()` method added to the `ExpandableItemViewHolder` interface

[New features & improvements]
- Introduced `DraggableItemState`, no more `DraggableItemConstants.STATE_FLAG_**` bit operations required anymore in user code
- Introduced `SwipeableItemState`, no more `SwipeableItemConstants.STATE_FLAG_**` bit operations required anymore in user code
- Introduced `ExpandableItemState`, no more `ExpandableItemConstants.STATE_FLAG_**` bit operations required anymore in user code
- Annotated many public method with `@NonNull` or `@Nullable`



## 0.11.0
[Breaking changes]
- Changed minimum SDK level to v14
Expand Down
15 changes: 10 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ buildscript {
repositories {
jcenter()
google()
maven {
url "http://dl.bintray.com/vigidroid/maven"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'me.vigi:fat-aar-plugin:0.2.8'
classpath 'com.android.tools.build:gradle:3.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -23,3 +19,12 @@ allprojects {
google()
}
}

project.ext {
compileSdkVersion = 28
buildToolsVersion = '28.0.3'
minSdkVersion = 14
targetSdkVersion = 28

recyclerViewVersion = '1.0.0'
}
1 change: 0 additions & 1 deletion common/android-maven-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def repoDir = project.mavenPublishDestDir
def dataProps = new Properties()
dataProps.load(project.file(project.mavenPublishDataFile).newDataInputStream())

def doclavaProjPath = project.path + ':doclava'
def optUseDoclava = project.useDoclava

task cleanDocsOutDir(type: Delete) {
Expand Down
30 changes: 0 additions & 30 deletions common/android-set-common-properties.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion common/android-signing-utils.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

def loadSigningConfigFromPropertiesFile(project, signingConfig, propFileName) {
static def loadSigningConfigFromPropertiesFile(project, signingConfig, propFileName) {
def props = new Properties()
def propFile = project.file(propFileName)

Expand Down
22 changes: 14 additions & 8 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,26 @@

apply plugin: 'com.android.application'

// Common configurations
apply from: '../common/android-set-common-properties.gradle'
apply from: '../common/android-signing-utils.gradle'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
applicationId "com.h6ah4i.android.example.advrecyclerview"
minSdkVersion 14
targetSdkVersion 27
versionCode 29
versionName "0.11.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 30
versionName "1.0.0"
vectorDrawables.useSupportLibrary = true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

signingConfigs {
release
}
Expand Down Expand Up @@ -64,6 +70,6 @@ if (loadSigningConfigFromPropertiesFile(
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':library')
implementation 'com.android.support:design:27.0.0'
implementation ('com.h6ah4i.android.tablayouthelper:tablayouthelper:0.9.0')
implementation 'com.google.android.material:material:1.0.0'
implementation ('com.h6ah4i.android.tablayouthelper:tablayouthelper:1.0.0')
}

This file was deleted.

1 change: 0 additions & 1 deletion example/src/main/assets/oss/1_android_support_design/LINK

This file was deleted.

1 change: 0 additions & 1 deletion example/src/main/assets/oss/1_android_support_design/NAME

This file was deleted.

10 changes: 0 additions & 10 deletions example/src/main/assets/oss/1_android_support_design/NOTICE

This file was deleted.

1 change: 0 additions & 1 deletion example/src/main/assets/oss/2_android_support_v4/LINK

This file was deleted.

1 change: 0 additions & 1 deletion example/src/main/assets/oss/2_android_support_v4/NAME

This file was deleted.

10 changes: 0 additions & 10 deletions example/src/main/assets/oss/2_android_support_v4/NOTICE

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions example/src/main/assets/oss/3_android_support_v7_appcompat/NOTICE

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
Expand All @@ -32,6 +30,9 @@

import java.util.List;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.ListFragment;


public class AboutActivity extends AppCompatActivity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -56,26 +55,24 @@ public List<LibraryInfo> collect() {

// sort numerically
final Pattern p = Pattern.compile("^([0-9]+).*$");
Arrays.sort(dirs, new Comparator<String>() {
public int compare(String s1, String s2) {
try {
Matcher m1 = p.matcher(s1);
Matcher m2 = p.matcher(s2);
if (m1.find() && m2.find()) {
int n1 = Integer.parseInt(m1.group(1));
int n2 = Integer.parseInt(m2.group(1));

if (n1 == n2) {
return s1.compareTo(s2);
}

return n1 - n2;
} else {
Arrays.sort(dirs, (s1, s2) -> {
try {
Matcher m1 = p.matcher(s1);
Matcher m2 = p.matcher(s2);
if (m1.find() && m2.find()) {
int n1 = Integer.parseInt(m1.group(1));
int n2 = Integer.parseInt(m2.group(1));

if (n1 == n2) {
return s1.compareTo(s2);
}
} catch (RuntimeException e) {

return n1 - n2;
} else {
return s1.compareTo(s2);
}
} catch (RuntimeException e) {
return s1.compareTo(s2);
}
});

Expand Down Expand Up @@ -131,20 +128,11 @@ private static Uri safeParseLinkUri(String s) {

// http://stackoverflow.com/questions/309424/read-convert-an-inputstream-to-a-string
private static String loadTextFile(AssetManager assets, String path) {
InputStream stream = null;
try {
stream = assets.open(path, AssetManager.ACCESS_STREAMING);
try (InputStream stream = assets.open(path, AssetManager.ACCESS_STREAMING)) {
java.util.Scanner s = new java.util.Scanner(stream).useDelimiter("\\A");
return s.hasNext() ? s.next().trim() : "";
} catch (IOException e) {
// just ignore
} finally {
if (stream != null) {
try {
stream.close();
} catch (IOException ignored) {
}
}
}
return null;
}
Expand Down

0 comments on commit cbffd84

Please sign in to comment.