зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
447123ac9c
Коммит
5a5211805e
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче