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

  • Home
  • SEARCH
  • 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 9152041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:56:50+00:00 2026-06-17T11:56:50+00:00

As the title states, I have a GoogleMap control (API v2) inside of a

  • 0

As the title states, I have a GoogleMap control (API v2) inside of a fragment that is itself an item in a ViewPager. When I drag on the map, if my first drag motion is on the horizontal axis, the ViewPager gets all of the drag events. If I make my first drag motion on the vertical plane, then all subsequent drags are delegated to the map control. I would like to have the GoogleMap capture all drag events. I added some debugging and I see that when I tap on the map control and when I begin dragging on the vertical plane, no onTouch events even make it to the ViewPager, so it seems that the GoogleMap gets the first chance to handle the event or pass it down. I can’t find any methods or listeners on the GoogleMap class to tell it to handle all touch/move/drag events.

  • 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-17T11:56:51+00:00Added an answer on June 17, 2026 at 11:56 am

    The solution was to create a custom ViewPager with an override of the canScroll method and use that in my xml. The canScroll method is passed a tree of child views recursively and then decides if the View is allowed to handle the horizontal scrolling or if it should be captured by the parent ViewPager

    public class MyViewPager extends ViewPager {
    
        public MyViewPager (Context context) {
            super(context);
        }
    
        public MyViewPager (Context context, AttributeSet attrs) {
            super(context, attrs);
        }
    
        @Override
        protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) {
            // Not satisfied with this method of checking...
            // working on a more robust solution
            if(v.getClass().getName().equals("maps.j.b")) {
                return true;
            }
            return super.canScroll(v, checkV, dx, x, y);
        }
    
    }
    

    and in your layout…

    <com.myproject.view.MyViewPager
        android:id="@+id/pager"
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Exactly like my title states i need a query that removes the first chracter
As the title states, I have a function that causes a div to fadeOut
As the title states, I have a session variable that is set during a
As the title states, I have a C# console app which uses interop to
As the title states, I am using devise. I came upon this link that
As the title states. I have an MVC 3 Razor view which i would
Like the title states, does anyone out there have a clear way to implement
As the title states, I'm wondering if it's possible to selectively choose tables that
As the title states, I am looking for something, that will help me automate
I have this simple hello world version of a google map api javascript v3

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.