android-touch-event Questions

1

I'm looking to create a debug feature. Here's a simplified representation: @Composable fun DebugLogOverlay(logs: List<String>){ LazyColumn( modifier = Modifier .background( color = Color...

5

Solved

I implemented the new ViewPager for my project. The viewPager2 contains a list of fragment private class ViewPagerAdapter extends FragmentStateAdapter { private ArrayList<Integer> classif...

7

Solved

I am creating an android app in Java in which I have a lot of <TextView> around the screen, all of them with onTouchListeners defined. They are wrapped in a <ScrollView> because they oc...
Cerda asked 9/2, 2016 at 13:17

2

I have a motionLayout for the root container, in my main layout. Inside it, there are other views. One of them is a frameLayout, containing a fragment. The fragment is a page, consisting a NestedSc...

1

Solved

I am running into an issue using MotionLayout where a user cannot swipe up/down if they start their swipe on a clickable item. I want the user to be able to swipe over any part of the screen, and t...

1

Solved

So I have a touch event and it handles ACTION_DOWN and ACTION_UP one by one. For example if I click on the left half of the screen ACTION_DOWN works but not ACTION_UP and same for the right side of...
Periodontal asked 21/7, 2020 at 22:6

13

I am using a SeekBar in my Android app. When a user single taps anywhere on the SeekBar, its progress value is changed. I only want the progress value to change when the user slides the SeekBar thu...
Tot asked 26/2, 2011 at 9:24

2

I am trying to add touch events from a file to the current application (build a new touch event according to the data found in the file ), and I am trying to understand the chain of calls when a &q...
Weirdo asked 16/12, 2013 at 18:17

1

Solved

I am very glad that Google released ViewPager2 which is built on RecyclerView to solve a lot of issues that the old ViewPager has. I quickly replaced my old ViewPager codes to ViewPager2: Replac...

1

I am using a NestedScrollWebView (heavily influenced by the NestedScrollView), which solves many of the known issues associated with using a WebView in a CoordinatorLayout. <android.support.des...

1

How can i drag a custom view inside the SurfaceView. Touch events are not dispatched to child custom view from SurfaceView or child view's onTouchEvent is not called.

3

Solved

According to android training if you extend GestureDetector.SimpleOnGestureListener, and return false from onDown(...) than the other methods of GestureDetector.SimpleOnGestureListener will never g...
Fessler asked 17/4, 2014 at 0:10

1

I have WebView(s) inside the RecyclerView. In order to get smooth scrolling experience such that when user scrolls, the RecyclerView will be responsible for scrolling (WebView should not scroll) I ...

14

What is the difference between onInterceptTouchEvent and dispatchTouchEvent in Android? According to the android developer guide, both methods can be used to intercept a touch event (MotionEvent),...

3

Solved

What I need is to detect the right swipe of the item and display some activity. I did prev. investigation but it not seems to obvious to catch correct solution. Please, help me. My code is followi...

1

I have an horizontal RecyclerView with leftPadding = 48dp, topPadding = 24dp and clipToPadding = false. It starts with an empty space on the left, but when the user scrolls the list its items are d...

2

I have a scroll view in my home page, inside that scroll view there are 2 layouts each layout for a recyclerview, each recyclerview will scroll horizontally. When I try to scroll the recyclerview t...

1

Solved

I was troubleshooting a view-related issue: a click listener that is not fired when it's supposed to. After a long session of trial-and-error, I found out that a parent view was disabled, thus disc...

6

Can we use scale gesture detector for pinch zoom in Android?
Incus asked 26/4, 2011 at 12:43

6

Solved

After a little bit of work my route application works fine. The only thing I just want to add is a double tap zoom in function, but I don't know how. Could you give me a hint?
Herbivorous asked 22/4, 2010 at 13:34

2

Solved

Considering the example from the below image, I'm looking for a solution to pass the touch events from the canvas View to the Viewpager. This is necessary for applying the same amount of zoom on...
Electroencephalograph asked 6/12, 2016 at 10:39

2

First of all this is a follow up question originally asked here, Pan, Zoom and Scale a custom View for Canvas drawing in Android Since there was no answer yet, I finally solved my issue using the ...

0

I'm working on a drawing app, where the user can pan & zoom to a specific portion of the screen and start drawing with zoom applied. To be more specific, I'm looking for a way to implement zoom...
Tetragon asked 25/8, 2016 at 22:14

2

I have in my layout recycler view for gallery application. I want to incorporate a pinch touch event listner such that the recycler view column no. increases or decreases on pich in and out. I ha...
Traumatize asked 12/6, 2016 at 9:57

1

I added a Recyclerview in one item of RecyclerViewPager(https://github.com/lsjwzh/RecyclerViewPager). And I want to scroll the RecyclerView when I touch on it. I have tried : View.OnTouchListene...

© 2022 - 2024 — McMap. All rights reserved.