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 8875475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:59:00+00:00 2026-06-14T18:59:00+00:00

I try to display a MapView in the TabPageIndicator of the ViewPageIndicator Library. To

  • 0

I try to display a MapView in the TabPageIndicator of the ViewPageIndicator Library.
To use the MapView in a Fragment, im working with the android-support-v4-r10.googlemaps.jar.

So far i can display the MapView, but it wont react on Touch-Events. I cant zoom or pan…

My MapFragment:

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    root = (View) inflater.inflate(R.layout.training_map, container, false);
    mapViewContainer = (ViewGroup) root.findViewById(R.id.map_container);
    return root;
}

@Override
public void onActivityCreated(Bundle bundle) {
    super.onActivityCreated(bundle);
    LoggingHelper.i("", "onActivityCreated");

    initTextViews();
    mapView = ((TrainingActivity) getActivity()).getMapView();
    //Zeigt einen blauen Punkt am derzeitigen Standort an
    locationOverlay = new MyLocationOverlay(getActivity(), mapView);
    locationOverlay.runOnFirstFix(new Runnable() {
        @Override
        public void run() {
            if(mapController != null){
                mapController.animateTo(locationOverlay.getMyLocation());
            }
        }
    });
    locationOverlay.enableMyLocation();
    mapViewContainer.addView(mapView);

}

The xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/tracking_maps_main_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:visibility="visible" >
    <LinearLayout
        android:id="@+id/map_container"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
    </LinearLayout>

    <ImageButton
        android:id="@+id/imageButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:onClick="onClickLock"
        android:src="@android:drawable/ic_lock_lock" />

</RelativeLayout>

FragmentActivity:

                ...
        //Paging Initialisieren
    adapter = new TrainingFragmentAdapter(getSupportFragmentManager(), fragments);
    viewPager = (ViewPager) findViewById(R.id.pager);
    viewPager.setAdapter(adapter);
    pageIndicator = (TabPageIndicator) findViewById(R.id.indicator);
    pageIndicator.setViewPager(viewPager);
            ...

    public MapView getMapView(){
    if(mapView == null){
        mapView = new MapView(this, "my-googlemaps-key...");
    }
    return mapView;
}
  • 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-14T18:59:01+00:00Added an answer on June 14, 2026 at 6:59 pm

    I believe the default value for MapView.setClickable() is false.

    Try the following:

    if(mapView == null){
        mapView = new MapView(this, "my-googlemaps-key...");
        mapView.setClickable(true); //add this line
    }
    

    Regards.

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

Sidebar

Related Questions

I'm using the following code to setup a mapview in android and display location
Can anyone guide how to display map on MapView with iframe code. I try
I try to display and add comment using Django admin, but Comment model use
I'm try display data from column points , SELECT * from table ORDER by
I am using the following code to try and display in a time in
I am a total beginner to Objective C. Currently I try to display a
I try to get one data column from a MS-Access table and display it
I would like to display an ajax loader icon when user try to submit
Is it possible to display images next to items in FlyoutAnchor submenu? I try
So I have a 1920x1080 display, and when I try to run two xcode

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.