mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 05:35:39 +03:00
change naming of Canvas c to Canvas canvas
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
f4e964e46e
commit
1dd2a5a71c
1 changed files with 14 additions and 14 deletions
|
@ -40,8 +40,8 @@ public class StickyHeaderItemDecoration extends RecyclerView.ItemDecoration {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDrawOver(@NonNull Canvas c, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
|
||||
super.onDrawOver(c, parent, state);
|
||||
public void onDrawOver(@NonNull Canvas canvas, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
|
||||
super.onDrawOver(canvas, parent, state);
|
||||
|
||||
View topChild = parent.getChildAt(0);
|
||||
if (topChild == null) {
|
||||
|
@ -62,25 +62,25 @@ public class StickyHeaderItemDecoration extends RecyclerView.ItemDecoration {
|
|||
}
|
||||
|
||||
if (adapter.isHeader(parent.getChildAdapterPosition(childInContact))) {
|
||||
moveHeader(c, currentHeader, childInContact);
|
||||
moveHeader(canvas, currentHeader, childInContact);
|
||||
return;
|
||||
}
|
||||
|
||||
drawHeader(c, currentHeader);
|
||||
drawHeader(canvas, currentHeader);
|
||||
}
|
||||
|
||||
private void drawHeader(Canvas c, View header) {
|
||||
c.save();
|
||||
c.translate(0, 0);
|
||||
header.draw(c);
|
||||
c.restore();
|
||||
private void drawHeader(Canvas canvas, View header) {
|
||||
canvas.save();
|
||||
canvas.translate(0, 0);
|
||||
header.draw(canvas);
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
private void moveHeader(Canvas c, View currentHeader, View nextHeader) {
|
||||
c.save();
|
||||
c.translate(0, nextHeader.getTop() - currentHeader.getHeight());
|
||||
currentHeader.draw(c);
|
||||
c.restore();
|
||||
private void moveHeader(Canvas canvas, View currentHeader, View nextHeader) {
|
||||
canvas.save();
|
||||
canvas.translate(0, nextHeader.getTop() - currentHeader.getHeight());
|
||||
currentHeader.draw(canvas);
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
private View getChildInContact(RecyclerView parent, int contactPoint) {
|
||||
|
|
Loading…
Reference in a new issue