android - Create custom View with horizontal RecyclerView and a custom border (with movement listener) -
i need create custom view, represents horizontal recyclerview border around it. border's left , right sides draggable on recyclerview items. it's ui video trimming. understand need create like:
public class customview extends recyclerview { .... ondraw(canvas cancas) { // , there should code draw borders like: paint paint = new paint(); paint.setcolor(color.red); paint.setstrokewidth(1.5f); paint.setstyle(paint.style.stroke); canvas.drawrect(0, 0, getwidth(), getheight(), paint); .... } }
edit: example how be
inside pink border should recyclerview images inside. want do.
for horizontal view,
final staggeredgridlayoutmanager layoutmanager = new staggeredgridlayoutmanager(1, staggeredgridlayoutmanager.horizontal); mrecyclerview.setlayoutmanager(layoutmanager);
& border use custom drawable.
Comments
Post a Comment