Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7904789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:14:17+00:00 2026-06-03T10:14:17+00:00

I have LinearLayout that has 1) Views on it and 2) has a Gesture

  • 0

I have LinearLayout that has 1) Views on it and 2) has a Gesture detector. My problem is that when I want to do a fling gesture on the linear layout, if my finger comes across any of the views, it will throw a MotionEvent.ACTION_CANCEL which will prevent the onFling() callback firing.

I can’t really disable touch on those foreground views because they are part of a navigation to launch Intents.

Thx,
-mL

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:14:19+00:00Added an answer on June 3, 2026 at 10:14 am

    Try to take a look inside of ViewPager how it does.
    http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.3_r1/android/support/v4/view/ViewPager.java#ViewPager.onInterceptTouchEvent%28android.view.MotionEvent%29

    You need to create your LinearLayout (by simply extending Android’s LinearLayout) and override onInterceptTouchEvent. This is called before child and if it returns true parent steals touch from children.
    http://developer.android.com/reference/android/view/ViewGroup.html#onInterceptTouchEvent(android.view.MotionEvent)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a clickable linear layout that I've generated programmaticly, and I want it
Just a straight forward problem. I have a LinearLayout which has attribute in xml
I need to have a layout that has a view above a set of
I have a View that inherits from LinearLayout that inflates itself. After it has
I have an Linear Layout inside the View Flipper. When i fling/swipe the layout
I have an application, which has a Spinner that I want populated with some
I have an extended BaseAdapter that has LinearLayout children (an ImageView and a TextView
I have a Tab that has a custom layout which contains a TextView .
I have applied scroll view to the entire layout and that layout has one
Right I have a main layout defined, that has a frame, a table in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.