Skip to content

Commit

Permalink
prevent animation when same position is chosen
Browse files Browse the repository at this point in the history
  • Loading branch information
worker8 committed Aug 13, 2018
1 parent 6bbe42f commit 176f0b5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AccordianView @JvmOverloads constructor(context: Context, attrs: Attribute
var selectedPosition = 0
set(value) {
adapter?.let { _adapter ->
if (value < _adapter.getItemCount() && value >= 0) {
if (value < _adapter.getItemCount() && value >= 0 && field != value) {
field = value
applyConstraint()
}
Expand Down

0 comments on commit 176f0b5

Please sign in to comment.