fix index out of bounds exception
This commit is contained in:
parent
5432f2590c
commit
4ca1a7b29e
|
@ -237,9 +237,9 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
|
||||||
spaceBelowText.setVisibility(translateVisible ? View.VISIBLE : View.GONE);
|
spaceBelowText.setVisibility(translateVisible ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
// remove additional padding when (transparently padded) translate button is visible
|
// remove additional padding when (transparently padded) translate button is visible
|
||||||
int pos = getAbsoluteAdapterPosition();
|
int nextPos = getAbsoluteAdapterPosition();
|
||||||
boolean nextIsFooter = item.parentFragment.getDisplayItems().size() >= pos + 1 &&
|
boolean nextIsFooter = item.parentFragment.getDisplayItems().size() > nextPos &&
|
||||||
item.parentFragment.getDisplayItems().get(pos + 1) instanceof FooterStatusDisplayItem;
|
item.parentFragment.getDisplayItems().get(nextPos) instanceof FooterStatusDisplayItem;
|
||||||
int bottomPadding = (translateVisible && nextIsFooter) ? 0
|
int bottomPadding = (translateVisible && nextIsFooter) ? 0
|
||||||
: nextIsFooter ? V.dp(8)
|
: nextIsFooter ? V.dp(8)
|
||||||
: V.dp(12);
|
: V.dp(12);
|
||||||
|
|
Loading…
Reference in New Issue