Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d08233

Browse files
committed
Merge pull request etsy#102 from jimmithy/master
LayoutParams casting issue when recycling state
2 parents 8dba11b + 8c4e5df commit 2d08233

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

library/src/main/java/com/etsy/android/grid/ExtendableListView.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2596,9 +2596,10 @@ private void clearRecycledState(ArrayList<FixedViewInfo> infos) {
25962596
if (infos == null) return;
25972597
for (FixedViewInfo info : infos) {
25982598
final View child = info.view;
2599-
final LayoutParams p = (LayoutParams) child.getLayoutParams();
2600-
if (p != null) {
2601-
p.recycledHeaderFooter = false;
2599+
final ViewGroup.LayoutParams p = child.getLayoutParams();
2600+
2601+
if (p instanceof LayoutParams) {
2602+
((LayoutParams) p).recycledHeaderFooter = false;
26022603
}
26032604
}
26042605
}

0 commit comments

Comments
 (0)