Skip to content

Commit

Permalink
Merge branch 'rc1'
Browse files Browse the repository at this point in the history
Conflicts:
	README.md
  • Loading branch information
davideas committed Jan 15, 2017
2 parents b503c46 + 9e2d0f8 commit af26563
Show file tree
Hide file tree
Showing 113 changed files with 6,589 additions and 2,759 deletions.
7 changes: 4 additions & 3 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Please check off the following points BEFORE submitting a new issue / asking support.
- [ ] Write a self explanatory Subject.
- [ ] Check if the issue has already been raised by someone else (see closed issue).

1) For Bugs / Support
- [ ] What you've tried (If necessary, indicate library Version / Android version / hardware)
- [ ] Expected behavior and actual behavior (problem encountered)
- [ ] Steps to reproduce the problem (also include code snippets if you think will help)
- [ ] What you've tried (If necessary, indicate library Version / Android version / hardware).
- [ ] Expected behavior and actual behavior (problem encountered).
- [ ] Steps to reproduce the problem (also include code snippets if you think will help).

2) For questions / new feature / improvement
- [ ] Simply Erase all this text and ask your question;
Expand Down
97 changes: 52 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,83 +2,87 @@
[![Download](https://api.bintray.com/packages/davideas/maven/flexible-adapter/images/download.svg) ](https://bintray.com/davideas/maven/flexible-adapter/_latestVersion)
[![API](https://img.shields.io/badge/API-14%2B-green.svg?style=flat)](https://android-arsenal.com/api?level=14)
[![Licence](https://img.shields.io/badge/Licence-Apache2-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![Methods and Size](https://img.shields.io/badge/Methods%20and%20Size-core:%201162%20|%20deps:%2021349%20|%20159%20KB-e91e63.svg)](http://www.methodscount.com/?lib=eu.davidea%3Aflexible-adapter%3A5.0.0-rc1)

# FlexibleAdapter

###### Fast and Versatile Adapter for your RecyclerView
- NEW! Beta version: [v5.0.0-b8](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b8) built on 2016.09.17 (144KB)

####ANNOUNCEMENT: Important and Revolutionary changes are foreseen in v5.0.0. Please see [issues](https://github.com/davideas/FlexibleAdapter/issues) and [releases](https://github.com/davideas/FlexibleAdapter/releases).

###### Fast and versatile Adapter for your RecyclerView
- **NEW!** First release candidate: [v5.0.0-rc1](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-rc1) built on 2017.01.14
- If you come from previous versions, update your code following the Wiki page [Migrations](https://github.com/davideas/FlexibleAdapter/wiki/Migrations).

> When initially Android team introduced the RecyclerView widget, we had to implement a custom Adapter in several applications, again and again to provide the items for our views.<br/>
We didn't know how to add selection and to combine all the use cases in the same Adapter.
Since I created this library, it has become easy to configure how views will be displayed in a list, and now, nobody wants to use a ListView anymore.

The idea behind is to regroup many functionalities in a unique library, without the need to customize and import several third libraries not compatible among them.
The idea behind is to regroup multiple features in a unique library, without the need to customize and import several third libraries not compatible among them.

The FlexibleAdapter helps developers to simplify this process without worrying too much about the Adapter anymore. It's easy to extend, it has predefined logic for different situations and prevents common mistakes.<br/>
This library is configurable and it guides the developers to create a better user experience and now, even more with the new ViewHolders and new actions.
This library is configurable and it guides the developers to create a better user experience and now, even more with the new features.

#### Main functionalities
#### Main features
* Simple item selection with ripple effect, Single & Multi selection mode.
* Restore deleted items, **NEW** works with Expandable items too!
* Customizable [FastScroller](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-FastScroller), **NEW** now in the library supporting all the 3 Layouts.
* Customizable divider item decoration.
* Add and Remove items with custom animations.
* [SearchFilter](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Search-Filter) with Spannable text, **NEW** result is animated. Works with sub items too!
* **NEW!** [High performance](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Search-Filter#performance-result-when-animations-are-active) on big list filtered with synchronization animations < 1'', slow phones < 2,5'' (available from beta8).
* **NEW!** Auto mapping ViewTypes with [Item interfaces](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Item-Interfaces).
* **NEW!** Predefined [ViewHolders](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-ViewHolders).
* **NEW!** [Headers/Sections](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Headers-and-Sections) with sticky behaviour fully clickable, collapsible, automatic linkage!
* **NEW!** Expandable items with <u>Selection Coherence</u>, multi-level expansion.
* **NEW!** [Drag&Drop and Swipe-To-Dismiss](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Drag&Drop-and-Swipe#swiping-the-front-view) with Leave-Behind pattern, with <u>Selection Coherence</u>.
* **NEW!** Customizable Scrolling-Animations based on adapter position and beyond.
* **NEW!** Innovative [EndlessScroll](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-On-Load-More) (<u>No OnScrollListener</u>).
* Async [SearchFilter](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Search-Filter) with Spannable text, **NEW** result list is animated. Works with sub items too!
* **NEW!** [High performance](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Search-Filter#performance-result-when-animations-are-active) updates and filter on big list.
* **NEW!** Auto mapping multi view types with [Item interfaces](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Item-Interfaces).
* **NEW!** Predefined [ViewHolders](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-ViewHolders) with callbacks.
* **NEW!** [Headers and Sections](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Headers-and-Sections) with sticky behaviour fully clickable and collapsible, with elevation, transparency and automatic linkage!
* **NEW!** [Scrollable Headers and Footers](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Scrollable-Headers-and-Footers) items that lay respectively at the top and at the bottom of the main items.
* **NEW!** Expandable items with _Selection Coherence_ and multi-level expansion.
* **NEW!** [Drag&Drop and Swipe-To-Dismiss](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-Drag&Drop-and-Swipe#swiping-the-front-view) with Leave-Behind pattern and with _Selection Coherence_.
* **NEW!** Customizable scrolling animations based on adapter position and beyond.
* **NEW!** Innovative [EndlessScroll](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-On-Load-More) (_No OnScrollListener_).
* **NEW!** UndoHelper &amp; [ActionModeHelper](https://github.com/davideas/FlexibleAdapter/wiki/5.x-%7C-ActionModeHelper).
* **NEW!** DrawableUtils for dynamic backgrounds with ripple (<u>No XML</u>).
* **NEW!** DrawableUtils for dynamic backgrounds with ripple (_No XML_).
* **NEW!** Easy runtime position calculation for adding/moving items in sections.
* **NEW!** [Wiki](https://github.com/davideas/FlexibleAdapter/wiki/) pages documentation.

# Setup
```
repositories {
jcenter()
maven {url = "http://dl.bintray.com/davideas/maven" }
maven {url = "https://oss.sonatype.org/content/repositories/snapshots/" } //For Snapshots
}
```
```
dependencies {
//Using JCenter
compile 'eu.davidea:flexible-adapter:5.0.0-b8'
// Using JCenter
compile 'eu.davidea:flexible-adapter:5.0.0-rc1'
//Using MavenSnapshots repository for continuous updates from my development
// Using MavenSnapshots repository for continuous updates from my development
compile 'eu.davidea:flexible-adapter:5.0.0-SNAPSHOT'
}
```

# Wiki!
I strongly recommend to read the **new [Wiki](https://github.com/davideas/FlexibleAdapter/wiki) pages**, where you can find a comprehensive Tutorial*.<br/>
Wiki pages have been completely reviewed to support all the coming functionalities from 5.0.0.
Wiki pages have been completely reviewed to support all the coming features of version 5.0.0.

\* = _Pages are under heavy revision, working in progress_ :-)

#### Pull requests / Issues / Improvement requests
Feel free to contribute and ask!<br/>
Active discussions:
- [The next steps of your development](https://github.com/davideas/FlexibleAdapter/issues/224).
- [Snapshots and Pre-Releases for FlexibleAdapter v5.0.0](https://github.com/davideas/FlexibleAdapter/issues/39).
- [Documentation](https://github.com/davideas/FlexibleAdapter/issues/120).

#### Under the hood
Some simple functionalities have been implemented thanks to some Blogs (see at the bottom of the page), merged and methods have been improved for speed and scalability, for all Activities that use a RecyclerView.
Some simple features have been implemented, thanks to some Blogs (see at the bottom of the page), merged and methods have been improved for speed and scalability.

* At lower level there is `SelectableAdapter` class. It provides selection functionalities and it's able to _maintain the state_ after the rotation: you just need to call the onSave/onRestore methods from the Activity!
* At lower level there is `SelectableAdapter` class. It provides selection features and it's able to _maintain the state_ after the rotation: you just need to call the onSave/onRestore methods from the Activity!
* At middle level, the `AnimatorAdapter` class has been added to give some animation at startup and when user scrolls.
* At front level, the core class `FlexibleAdapter`. It holds and handles the main list, performs actions on all different types of item paying attention at the adding and removal of the items, as well as the new concept of "selection coherence".
* New useful extensions and helpers have been added during the time to simplify the development.
* Item interfaces and predefined ViewHolders complete the whole library giving more actions to the items and configuration options to the developers and the end user.

# Showcase of the demo App
You can download the latest demo App from the latest release page.
You can download the latest demo App from the latest release page OR run it with the emulator.

![Drag Grid & Overall](/screenshots/drag_grid_overall.png)
![Secondary Functionalities](/screenshots/secondary_functionalities.png)
Expand All @@ -98,25 +102,26 @@ You can download the latest demo App from the latest release page.

# Change Log
###### Latest release
[v5.0.0-b8](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b8) - 2016.09.17
[v5.0.0-rc1](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-rc1) - 2017.01.14

###### Old releases
[v5.0.0-b8](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b8) - 2016.09.17 |
[v5.0.0-b7](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b7) - 2016.06.20 |
[v5.0.0-b6](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b6) - 2016.05.01 |
[v5.0.0-b5](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b5) - 2016.04.04 |
[v5.0.0-b4](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b4) - 2016.02.21<br/>
[v5.0.0-b3](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b3) - 2016.02.08 |
[v5.0.0-b2](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b2) - 2016.01.31 |
[v5.0.0-b6](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b6) - 2016.05.01 |
[v5.0.0-b5](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b5) - 2016.04.04<br/>
[v5.0.0-b4](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b4) - 2016.02.21 |
[v5.0.0-b3](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b3) - 2016.02.08 |
[v5.0.0-b2](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b2) - 2016.01.31 |
[v5.0.0-b1](https://github.com/davideas/FlexibleAdapter/releases/tag/5.0.0-b1) - 2016.01.03<br/>
[v4.2.0](https://github.com/davideas/FlexibleAdapter/releases/tag/4.2.0) - 2015.12.12 |
[v4.1.0](https://github.com/davideas/FlexibleAdapter/releases/tag/4.1.0) - 2015.11.29 |
[v4.0.1](https://github.com/davideas/FlexibleAdapter/releases/tag/4.0.1) - 2015.11.01 |
[v4.2.0](https://github.com/davideas/FlexibleAdapter/releases/tag/4.2.0) - 2015.12.12 |
[v4.1.0](https://github.com/davideas/FlexibleAdapter/releases/tag/4.1.0) - 2015.11.29 |
[v4.0.1](https://github.com/davideas/FlexibleAdapter/releases/tag/4.0.1) - 2015.11.01 |
[v4.0.0](https://github.com/davideas/FlexibleAdapter/releases/tag/4.0.0) - 2015.10.18<br/>
[v3.1](https://github.com/davideas/FlexibleAdapter/releases/tag/v3.1) - 2015.08.18 |
[v3.0](https://github.com/davideas/FlexibleAdapter/releases/tag/v3.0) - 2015.07.29 |
[v2.2](https://github.com/davideas/FlexibleAdapter/releases/tag/v2.2) - 2015.07.20 |
[v2.1](https://github.com/davideas/FlexibleAdapter/releases/tag/v2.1) - 2015.07.03 |
[v2.0](https://github.com/davideas/FlexibleAdapter/releases/tag/v2.0) - 2015.06.19 |
[v3.1](https://github.com/davideas/FlexibleAdapter/releases/tag/v3.1) - 2015.08.18 |
[v3.0](https://github.com/davideas/FlexibleAdapter/releases/tag/v3.0) - 2015.07.29 |
[v2.2](https://github.com/davideas/FlexibleAdapter/releases/tag/v2.2) - 2015.07.20 |
[v2.1](https://github.com/davideas/FlexibleAdapter/releases/tag/v2.1) - 2015.07.03 |
[v2.0](https://github.com/davideas/FlexibleAdapter/releases/tag/v2.0) - 2015.06.19 |
[v1.0](https://github.com/davideas/FlexibleAdapter/releases/tag/v1.0) - 2015.05.03

# Limitations
Expand All @@ -131,18 +136,20 @@ I've used these blogs as starting point:
Special thanks goes to Martin Guillon ([Akylas](https://github.com/Akylas)) to have contributed at the development of the new technique for the Sticky Header.

# Imported libraries
- For the moment only [LollipopContactsRecyclerViewFastScroller](https://github.com/AndroidDeveloperLB/LollipopContactsRecyclerViewFastScroller) has been imported, improved and adapted to work in conjunction with `AnimatorAdapter`.
- The library [sticky-headers-recyclerview](https://github.com/timehop/sticky-headers-recyclerview) was initially imported and super-optimized for _FlexibleAdapter_, then it was removed in favor of the new technique able to keep the _View_ and so to handle the click events.
- The library [LollipopContactsRecyclerViewFastScroller](https://github.com/AndroidDeveloperLB/LollipopContactsRecyclerViewFastScroller) has been imported, improved and adapted to work in conjunction with `AnimatorAdapter`.
- The library [sticky-headers-recyclerview](https://github.com/timehop/sticky-headers-recyclerview) was initially imported, then it was removed in favor of the new technique able to manage a real _View_ and so to handle the click events.

# Apps that use this Adapter
It will be a pleasure to add your App here.
- [Socio - Shake and Connect!](https://play.google.com/store/apps/details?id=com.atsocio.socio)<br/>
- [BNVR Client](https://play.google.com/store/apps/details?id=ru.beward.bnvr)<br/>
- [Module.org](https://play.google.com/store/apps/details?id=org.module.app)<br/>
It will be a pleasure to add your App here, once it is published.

[Module.org](https://play.google.com/store/apps/details?id=org.module.app) |
[Socio - Shake and Connect!](https://play.google.com/store/apps/details?id=com.atsocio.socio) |
[Shibagram](https://play.google.com/store/apps/details?id=com.apripachkin.shibagram) |
[BNVR Client](https://play.google.com/store/apps/details?id=ru.beward.bnvr)

# License

Copyright 2015-2016 Davide Steduto
Copyright 2015-2017 Davide Steduto

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ ext {
developerEmail = "dave.dna@gmail.com"

//Library
libraryCode = 18
libraryVersion = "5.0.0-b8"
libraryCode = 19
libraryVersion = "5.0.0-rc1"
libraryDate = " built on " + getDate()
libraryDescription = "1 Adapter for SelectionMode, Undo, ViewHolders, Filter, FastScroller, Animations, Sticky Headers, Expandable, Draggable, Swipeable, EndlessScroll :-)"
libraryDescription = "1 Adapter for SelectionMode, ViewHolders, AsyncFilter, FastScroller, Animations, Undo, Sections, Sticky Headers, Scrollable Headers and Footers, EndlessScroll, Expandable, Draggable, Swipeable :-)"
libraryName = "FlexibleAdapter"
packageExt = "aar"

Expand All @@ -23,9 +23,9 @@ ext {

//Support and Build tools version
minSdk = 14
targetSdk = 24
buildTools = "23.0.3"
supportLib = "24.2.1"
targetSdk = 25
buildTools = "25.0.2"
supportLib = "25.1.0"

//Support Libraries dependencies
supportDependencies = [
Expand All @@ -49,7 +49,7 @@ def getDate() {
return date.format('yyyy.MM.dd')
}

//Avoid Javadoc Lint failures when using Java8
//Avoid JavaDoc Lint failures when using Java8
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
Expand All @@ -65,7 +65,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "com.github.dcendents:android-maven-gradle-plugin:1.5"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7"
Expand Down
8 changes: 4 additions & 4 deletions flexible-adapter-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ android {
dependencies {
//Testing
androidTestCompile supportDependencies.annotations
androidTestCompile 'com.android.support.test:runner:0.4.1'
androidTestCompile 'com.android.support.test:rules:0.4.1'
testCompile 'org.robolectric:robolectric:3.1.1'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
testCompile 'org.robolectric:robolectric:3.1.2'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.0.71-beta'

//FlexibleAdapter
compile project (":flexible-adapter")

//FlipView
compile "eu.davidea:flipview:1.1.1"
compile "eu.davidea:flipview:1.1.2"

//ButterKnife
compile 'com.jakewharton:butterknife:8.0.1'
Expand Down
16 changes: 12 additions & 4 deletions flexible-adapter-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="eu.davidea.samples.flexibleadapter"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest package="eu.davidea.samples.flexibleadapter"
xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>

Expand All @@ -20,14 +19,23 @@
</activity>
<!-- #139 Test for Automatic configuration change -->
<activity android:name=".MainActivity">
<!--android:configChanges="orientation|screenSize"> -->
<!--android:configChanges="orientation|screenSize"> -->
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable"/>
<intent-filter>
<action android:name="android.intent.action.SEARCH"/>
</intent-filter>
</activity>
<activity
android:name=".ViewPagerActivity"
android:label="@string/title_activity_view_pager"
android:parentActivityName=".MainActivity"
android:theme="@style/AppTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="eu.davidea.samples.flexibleadapter.MainActivity"/>
</activity>
</application>

</manifest>
Loading

0 comments on commit af26563

Please sign in to comment.