MCPcopy Create free account
hub / github.com/M66B/FairEmail / onDraw

Method onDraw

app/src/main/java/eu/faircode/email/ActivityView.java:552–567  ·  view source on GitHub ↗
(@NonNull Canvas canvas, @NonNull RecyclerView parent, @NonNull RecyclerView.State state)

Source from the content-addressed store, hash-verified

550 LayoutInflater inflater = LayoutInflater.from(this);
551 DividerItemDecoration categoryDecorator = new DividerItemDecoration(this, llmAccounts.getOrientation()) {
552 @Override
553 public void onDraw(@NonNull Canvas canvas, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
554 int count = parent.getChildCount();
555 for (int i = 0; i < count; i++) {
556 View view = parent.getChildAt(i);
557 int pos = parent.getChildAdapterPosition(view);
558
559 View header = getView(view, parent, pos);
560 if (header != null) {
561 canvas.save();
562 canvas.translate(0, parent.getChildAt(i).getTop() - header.getMeasuredHeight());
563 header.draw(canvas);
564 canvas.restore();
565 }
566 }
567 }
568
569 @Override
570 public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {

Callers

nothing calls this directly

Calls 4

getViewMethod · 0.95
drawMethod · 0.65
saveMethod · 0.45
translateMethod · 0.45

Tested by

no test coverage detected