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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -