touch-event

How to improve touchmove performance @Android/Chrome?

笑着哭i 提交于 2021-01-29 07:07:47
问题 I'm developing a custom drag UI using touch events. When there is a scrollbar on the page, Chrome Android touchmove performance is abysmal, the event will only fire a couple times per second which results in extremely jerky dragging. The problem won't reproduce when there is no scrollbar or when testing using Chrome devtools emulator. Adding touch-events: none; CSS property helps with the issue but also prevents native scrolling from happening inside the container so using this approach will

How I can restrict position view while moving/dragging on PDFView? (Swift)

六月ゝ 毕业季﹏ 提交于 2021-01-28 07:58:45
问题 I took one custom view (SignatoryView) on pdf, When I click on Add button from Navigation bar, it will add that SignatoryView on PDF view and according to my choice I can move/drag that signatory view to any location. Problem : When I am moving that signatory view on pdf, it is going outside edges of pdfView. (Left, right, bottom and top also) Here is the demo : It should not go beyond its boundaries, it should be movable only inside edges on PDF view. How I can achieve this ? Here is the

Using BottomSheetBehavior with a inner CoordinatorLayout

十年热恋 提交于 2021-01-20 14:12:28
问题 The design support library v. 23.2 introduced BottomSheetBehavior , which allows childs of a coordinator to act as bottom sheets (views draggable from the bottom of the screen). What I’d like to do is to have, as a bottom sheet view , the following view (the typical coordinator + collapsing stuff): <CoordinatorLayout app:layout_behavior=“@string/bottom_sheet_behavior”> <AppBarLayout> <CollapsingToolbarLayout> <ImageView /> </CollapsingToolbarLayout> </AppBarLayout> <NestedScrollView>

Using BottomSheetBehavior with a inner CoordinatorLayout

本秂侑毒 提交于 2021-01-20 14:09:18
问题 The design support library v. 23.2 introduced BottomSheetBehavior , which allows childs of a coordinator to act as bottom sheets (views draggable from the bottom of the screen). What I’d like to do is to have, as a bottom sheet view , the following view (the typical coordinator + collapsing stuff): <CoordinatorLayout app:layout_behavior=“@string/bottom_sheet_behavior”> <AppBarLayout> <CollapsingToolbarLayout> <ImageView /> </CollapsingToolbarLayout> </AppBarLayout> <NestedScrollView>