Bug 1385988 - HighlightsDividerItemDecoration: Use adapter position and not current position in parent view. r=mcomella

MozReview-Commit-ID: Ih6USplyBTb

--HG--
extra : rebase_source : 72e050306454ea0a9261a2ffb6ce0351e662d198
This commit is contained in:
Sebastian Kaspari 2017-09-08 17:08:05 +02:00
Родитель 447123ac9c
Коммит 5a5211805e
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -37,11 +37,17 @@ import android.view.View;
final int right = parent.getWidth() - parent.getPaddingRight();
final int childCount = parent.getChildCount();
for (int i = START_DRAWING_AT_POSITION; i < childCount; i++) {
for (int i = 0; i < childCount; i++) {
final View child = parent.getChildAt(i);
if (parent.getChildAdapterPosition(child) < START_DRAWING_AT_POSITION) {
continue;
}
if (child.getVisibility() == View.GONE) {
continue;
}
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
.getLayoutParams();
final int top = child.getBottom() + params.bottomMargin;