Skip to content

Commit

Permalink
fix adapter generic
Browse files Browse the repository at this point in the history
  • Loading branch information
saschoar committed Mar 24, 2018
1 parent 7a064ae commit e2bc7a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sequencelayout/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {

buildTypes {
release {
minifyEnabled true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.transferwise.sequencelayout
/**
* Adapter to bind data to [com.transferwise.sequencelayout.SequenceStep]s for a [com.transferwise.sequencelayout.SequenceLayout].
*/
public abstract class SequenceAdapter<T> {
public abstract class SequenceAdapter<T> where T : Any {

abstract fun getCount(): Int

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public class SequenceLayout(context: Context?, attrs: AttributeSet?, defStyleAtt
/**
* Replaces all contained [com.transferwise.sequencelayout.SequenceStep]s with those provided and bound by the adapter
*/
public fun setAdapter(adapter: SequenceAdapter<SequenceStep>) {
public fun <T> setAdapter(adapter: SequenceAdapter<T>) where T : Any {
removeAllSteps()
val count = adapter.getCount()
for (i in 0 until count) {
Expand Down

0 comments on commit e2bc7a7

Please sign in to comment.