Skip to content

Commit

Permalink
upgraded versions + added notify item change for header method
Browse files Browse the repository at this point in the history
  • Loading branch information
Asaf Kinamoni committed Jan 3, 2019
1 parent 93ec426 commit b1369b8
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 20 deletions.
22 changes: 11 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
compileSdkVersion 28
buildToolsVersion "28.0.3"

defaultConfig {
applicationId "org.zakariya.stickyheadersapp"
minSdkVersion 19
targetSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
Expand All @@ -20,12 +20,12 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile project(path: ':stickyheaders')
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.0.2'
implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
implementation project(path: ':stickyheaders')
}
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.android.tools.build:gradle:3.2.1'

classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath "com.github.dcendents:android-maven-gradle-plugin:1.4.1"
Expand All @@ -18,6 +19,7 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Sep 14 10:14:49 PDT 2016
#Thu Jan 03 11:21:09 IST 2019
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-4.6-all.zip
12 changes: 6 additions & 6 deletions stickyheaders/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ group = 'org.zakariya.stickyheaders'
version = '0.7.6'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
compileSdkVersion 28
buildToolsVersion "28.0.3"

defaultConfig {
minSdkVersion 11
targetSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName version
}
Expand All @@ -24,9 +24,9 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:25.0.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:recyclerview-v7:28.0.0'
}

task generateSourcesJar(type: Jar) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,20 @@ public void notifySectionRemoved(int sectionIndex) {
updateCollapseAndSelectionStateForSectionChange(sectionIndex, -1);
}

public void notifySectionHeaderChanged(int sectionIndex) {
if (sections == null) {
buildSectionIndex();
notifyAllSectionsDataSetChanged();
} else {
buildSectionIndex();
Section section = this.sections.get(sectionIndex);
if (!section.hasHeader) {
throw new IllegalArgumentException("notifySectionFooterChanged: adapter implementation reports that section " + sectionIndex + " does not have a header");
}
notifyItemChanged(section.adapterPosition);
}
}

/**
* Notify that a section has had a footer added to it
*
Expand Down

0 comments on commit b1369b8

Please sign in to comment.