Skip to content

Commit 73ac5fa

Browse files
authored
Merge pull request janishar#20 from janishar/feature/remove_all_views/15_dec_2016
recycler view version update and remove all views method
2 parents 6c0e1a1 + 4d1ebd1 commit 73ac5fa

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 24
5-
buildToolsVersion "24.0.3"
4+
compileSdkVersion 25
5+
buildToolsVersion "25.0.1"
66

77
defaultConfig {
88
applicationId "com.mindorks.test"
99
minSdkVersion 16
10-
targetSdkVersion 24
10+
targetSdkVersion 25
1111
versionCode 1
1212
versionName "1.0"
1313
}
@@ -28,9 +28,9 @@ android {
2828
dependencies {
2929
compile fileTree(dir: 'libs', include: ['*.jar'])
3030
testCompile 'junit:junit:4.12'
31-
compile 'com.android.support:appcompat-v7:24.2.1'
32-
compile 'com.android.support:design:24.2.1'
33-
compile 'com.android.support:cardview-v7:24.2.1'
31+
compile 'com.android.support:appcompat-v7:25.1.0'
32+
compile 'com.android.support:design:25.1.0'
33+
compile 'com.android.support:cardview-v7:25.1.0'
3434
compile 'com.github.bumptech.glide:glide:3.7.0'
3535
compile 'com.google.code.gson:gson:2.7'
3636

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.2'
8+
classpath 'com.android.tools.build:gradle:2.2.3'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files

placeholderview/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ ext {
2525
}
2626

2727
android {
28-
compileSdkVersion 24
29-
buildToolsVersion "24.0.2"
28+
compileSdkVersion 25
29+
buildToolsVersion "25.0.1"
3030

3131
defaultConfig {
3232
minSdkVersion 16
33-
targetSdkVersion 24
33+
targetSdkVersion 25
3434
versionCode 7
3535
versionName "0.5.2"
3636
}
@@ -44,7 +44,7 @@ android {
4444

4545
dependencies {
4646
testCompile 'junit:junit:4.12'
47-
compile 'com.android.support:recyclerview-v7:24.+'
47+
compile 'com.android.support:recyclerview-v7:25.+'
4848
}
4949

5050
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'

placeholderview/src/main/java/com/mindorks/placeholderview/SwipePlaceHolderView.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import android.widget.FrameLayout;
1414

1515
import java.util.ArrayList;
16+
import java.util.Iterator;
1617
import java.util.List;
1718
import java.util.concurrent.atomic.AtomicBoolean;
1819

@@ -682,6 +683,15 @@ public void removeViews(int start, int count) {
682683
*/
683684
@Override
684685
public void removeAllViews() {
686+
Iterator<SwipeViewBinder<Object, FrameView>> iterator = mSwipeViewBinderList.iterator();
687+
while (iterator.hasNext()){
688+
SwipeViewBinder<Object, FrameView> swipeViewBinder = iterator.next();
689+
if(swipeViewBinder != null){
690+
swipeViewBinder.unbind();
691+
}
692+
iterator.remove();
693+
}
694+
mRestoreResolverOnUndo = null;
685695
super.removeAllViews();
686696
}
687697

0 commit comments

Comments
 (0)