mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-09-15 08:20:18 +03:00
Fix issue #1252 - ArrayIndexOutOfBoundsException
This commit is contained in:
parent
82104f87bb
commit
d3ce29855b
2 changed files with 2 additions and 4 deletions
|
@ -118,8 +118,7 @@ public class DividerDecoration extends RecyclerView.ItemDecoration {
|
|||
|
||||
c.drawLine(startPx, view.getTop() - margin, startPx, bottomPx, paint);
|
||||
}
|
||||
int indexColor = indentation%colorList.size();
|
||||
int color = colorList.get(indexColor > 0 ? indexColor-1:0);
|
||||
int color = colorList.get((indentation-1)%colorList.size());
|
||||
paint.setColor(ResourcesCompat.getColor(_mContext.getResources(), color, _mContext.getTheme()));
|
||||
|
||||
float startDp = 6 * fontScale * (indentation - 1) + 6 * fontScale;
|
||||
|
|
|
@ -127,9 +127,8 @@ public class DividerDecorationSimple extends RecyclerView.ItemDecoration {
|
|||
|
||||
c.drawLine(startPx, view.getTop() - margin, startPx, bottomPx, paint);
|
||||
}
|
||||
int indexColor = indentation%colorList.size();
|
||||
|
||||
int color = colorList.get(indexColor > 0 ? indexColor-1:0);
|
||||
int color = colorList.get((indentation-1)%colorList.size());
|
||||
paint.setColor(ResourcesCompat.getColor(_mContext.getResources(), color, _mContext.getTheme()));
|
||||
|
||||
float startDp = 6 * fontScale * (indentation - 1) + 6 * fontScale;
|
||||
|
|
Loading…
Reference in a new issue