| 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) { |