Questions tagged [mapfragment]

The Android Fragment that represents a Map component in an Android app.

240 questions
1
vote
0 answers

Map Fragment Resize

I am quite new to Android Development and have been following guides. I have a drawer layout with different fragments for each of the different screens. Inside 1 of the fragment is another SupportMapFragment which I am using for Google Maps. The…
uniQ
  • 115
  • 2
  • 16
1
vote
1 answer

MapFragment is not getting initialised

I have been working in Navigation Drawer Activity, it has many fragments and one of the fragment contains MapFragment. Now there is a problem in MapFragment i-e When for the first time i open the fragment that contains MapFragment inside it…
1
vote
0 answers

How to find which process is blocking Android MapFragment UI Thread

Whenever i open an intent, then presses back sometimes give ANR. Which means something is blocking my UI Thread. How to handle this. Can i start my activity on a separate thread. Even though it's a single threaded model
Visal Varghese
  • 436
  • 5
  • 14
1
vote
2 answers

Android Studio : Error inflating class fragment

I'm writing an android app that includes a google map fragment. When I exclude the map fragment from the activity it's contained in, the app runs fine. When I include the map fragment, I get the exception quoted in the blockquote below. The most…
1
vote
1 answer

Android disbled scrollView on MapFragment long click

I have an Activity in which I have several EditTexts and MapFragment , etc. The XML of this activity is a ScrollView. How could I do so that when the user make a long click on the map ( to fix its position) the scroll stop working, and once again…
1
vote
2 answers

How to keep markers on a map fragment when configuration changes?

I have a map fragment in my Main Activity that on my onMapReady I am adding let's say 300 markers. The markers are divided into 5 categories, each category saved in a List category1(2,3,4,5) = new ArrayList. I have a button that filters the markers…
Alex Simion
  • 93
  • 1
  • 14
1
vote
2 answers

Instabug map is not available in screenshot

This is the code where I add the map to instabug: Log.i("","entered here... map:" + mMap + "...." + mMapFragment.getView()); PSLocationCenter.getInstance().instabug.addMapView(mMapFragment.getView(), mMap); Where…
rosu alin
  • 5,674
  • 11
  • 69
  • 150
1
vote
1 answer

opening google map fragment on button click in android studio

I would like to create an app in Android Studio that has a Button in Main Activity and when i clicks this button, it should open a google map with my customized lat,lng markers and camera functions as an another activity. I tried this one by…
1
vote
0 answers

How to use MapFragment inside Scrollview?I am Using the getMapFragment() method.

In my application I am using MapFragment inside Activity class.In layout file the fragment inside the ScrollView.when I am touching the Map,It leads to scroll the page I cannot access the Map to Zoom In,Zoom Out,Move the Places.Only ScrollView focus…
Gopal
  • 580
  • 8
  • 26
1
vote
0 answers

I am using MapView in v2 android google maps in a fragment but confused why we need to override all lifecycle methods?

I am using this link https://stackoverflow.com/a/34626302/5761156 and taking reference from here https://gist.github.com/joshdholtz/4522551 but unable to understand why we need to override lifecycle methods such as on resume and on destroy . I tried…
1
vote
1 answer

Capture double tap from map fragment

I am trying to capture the double tap event using a gesture detector. I have an overlay frame that is placed on top of my map fragment, and implements ontouch and ongesture listeners. The problem is I can only seem to get one layer to capture the…
Derongan
  • 790
  • 6
  • 24
1
vote
2 answers

Android – MapFragment overlay button shadow, just like MyLocation button

I'm struggling to add a shadow to my custom overlay button over the google map. My goal is to make my custom button look just like Google's MyLocation button. Here's how my app looks like now: layout.xml
1
vote
1 answer

How to implement a MapFragment in an Fragment of a Tab

I have serveral Tabs created with a FragmentPagerAdapter and in with this Adapter I'm getting my "Tab-Fragments" with the getItem Method: @Override public Fragment getItem(int position) { switch (position) { case 0: …
1
vote
1 answer

MapFragment won't draw itself

I've been making a map that implements a FrameLayout to whom I attach a MapFragment programatically (I use FragmentManager to add the fragment). Here's my onCreate method (ignore the ad things, I am just testing stuff): @Override protected void…
Ilan
  • 513
  • 2
  • 8
  • 24
1
vote
2 answers

MapFragment - The application may be doing too much work on its main thread

I was having the following error Skipped 40 frames! The application may be doing too much work on its main thread. Researched about it... Made sure everything started in new threads as much as possible with Runnables. But kept getting the error. I…
Jesse
  • 544
  • 5
  • 24