зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1402481 - Reverse incorrect sign of margin calculation. r=mcomella
MozReview-Commit-ID: ICS81o8pLOE --HG-- extra : rebase_source : 9ee338ea1726ff529a77af8a93ba5fda52caa698
This commit is contained in:
Родитель
9a193dcc02
Коммит
f13df1a160
|
@ -61,7 +61,9 @@ import android.view.View;
|
|||
|
||||
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
|
||||
.getLayoutParams();
|
||||
final int topOfDivider = child.getTop() + params.topMargin;
|
||||
final int dividerHeight = divider.getIntrinsicHeight();
|
||||
// Use dividerHeight / 2 to account for divider height and place it evenly between the two views.
|
||||
final int topOfDivider = child.getTop() - params.topMargin - dividerHeight / 2;
|
||||
final int bottomOfDivider = topOfDivider + divider.getIntrinsicHeight();
|
||||
divider.setBounds(left, topOfDivider, right, bottomOfDivider);
|
||||
divider.draw(c);
|
||||
|
|
Загрузка…
Ссылка в новой задаче