Skip to content

Commit

Permalink
Updated to minSdk=9; Compiles against API 25; Fixes #30 ; JavaDoc cha…
Browse files Browse the repository at this point in the history
…nges as reported in #28
  • Loading branch information
sockeqwe committed Jan 4, 2017
1 parent 702752c commit 8512fe7
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -4,8 +4,8 @@ android:
components:
- platform-tools
- tools
- android-24
- build-tools-24.0.3
- android-25
- build-tools-25.0.0
- extra-android-support
- extra-android-m2repository
licenses:
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
compileSdkVersion 25
buildToolsVersion rootProject.ext.buildTools

defaultConfig {
applicationId "com.hannesdorfmann.adapterdelegates.sample"
minSdkVersion 8
targetSdkVersion 24
minSdkVersion 9
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.android.tools.build:gradle:2.2.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -20,11 +20,11 @@ allprojects {


ext {
recyclerView = 'com.android.support:recyclerview-v7:24.0.0'
appCompat = 'com.android.support:appcompat-v7:24.0.0'
recyclerView = 'com.android.support:recyclerview-v7:25.1.0'
appCompat = 'com.android.support:appcompat-v7:25.1.0'

javaSourceCompatibility = JavaVersion.VERSION_1_7
javaTargetCompatibility = JavaVersion.VERSION_1_7

buildTools = '24.0.3'
buildTools = '25.0.0'
}
6 changes: 3 additions & 3 deletions library/build.gradle
@@ -1,12 +1,12 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 24
compileSdkVersion 25
buildToolsVersion rootProject.ext.buildTools

defaultConfig {
minSdkVersion 8
targetSdkVersion 24
minSdkVersion 9
targetSdkVersion 25
versionCode 2
versionName "3.0"
}
Expand Down
@@ -1,7 +1,6 @@
package com.hannesdorfmann.adapterdelegates3;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.ViewGroup;
import java.util.List;
Expand Down Expand Up @@ -46,7 +45,7 @@ public abstract class AbsListItemAdapterDelegate<I extends T, T, VH extends Recy
}

@Override protected final void onBindViewHolder(@NonNull List<T> items, int position,
@NonNull RecyclerView.ViewHolder holder, @Nullable List<Object> payloads) {
@NonNull RecyclerView.ViewHolder holder, @NonNull List<Object> payloads) {
onBindViewHolder((I) items.get(position), (VH) holder, payloads);
}

Expand Down
Expand Up @@ -204,7 +204,7 @@ public AdapterDelegatesManager<T> removeDelegate(int viewType) {
* @param position the position in adapters data source
* @return the ViewType (integer). Returns {@link #FALLBACK_DELEGATE_VIEW_TYPE} in case that the
* fallback adapter delegate should be used
* @throws IllegalArgumentException if no {@link AdapterDelegate} has been found that is
* @throws NullPointerException if no {@link AdapterDelegate} has been found that is
* responsible for the given data element in data set (No {@link AdapterDelegate} for the given
* ViewType)
* @throws NullPointerException if items is null
Expand Down Expand Up @@ -269,7 +269,7 @@ public int getItemViewType(@NonNull T items, int position) {
* viewType
*/
public void onBindViewHolder(@NonNull T items, int position,
@NonNull RecyclerView.ViewHolder viewHolder, @Nullable List payloads) {
@NonNull RecyclerView.ViewHolder viewHolder, List payloads) {

AdapterDelegate<T> delegate = getDelegateForViewType(viewHolder.getItemViewType());
if (delegate == null) {
Expand All @@ -278,7 +278,8 @@ public void onBindViewHolder(@NonNull T items, int position,
+ " for viewType = "
+ viewHolder.getItemViewType());
}
delegate.onBindViewHolder(items, position, viewHolder, payloads);
delegate.onBindViewHolder(items, position, viewHolder,
payloads != null ? payloads : PAYLOADS_EMPTY_LIST);
}

/**
Expand Down

0 comments on commit 8512fe7

Please sign in to comment.