supportmapfragment

Android : Support MapFragment Returns null

删除回忆录丶 提交于 2019-12-08 04:26:46
问题 I have updated the android SDK to 5.0 and my previous project is not working on it(which worked correctly in 4.4.2). I have an class which extends fragment public class MapFragment extends Fragment{ // } In this class i have inflated a layout with google support mapfragment <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map_tile_layout" android:layout_width="match_parent" android:layout_height="match_parent"

SupportMapFragment with navigationDrawer

北城余情 提交于 2019-12-08 02:56:27
问题 I have an activity that extends ActionBarActivity and has a navigation drawer. This is the xml layout of the activity: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <FrameLayout android:id="@+id/container" android:layout_width="match_parent" android:layout

Using Two SupportMapFragment in one Activity but unable remove Marker from Second SupportMapFragment that i have added in First SupportMapFragment

淺唱寂寞╮ 提交于 2019-12-08 01:36:11
问题 I have strange issue while using Two SupportMapFragment in two different Fragment in one Activity. Actually my problem is let say In OneFragment i have SupprtMapFragment added and i add 10 Marker in that map view and now i go to detail page by adding another Fragment and in that it have also SupprtMapFragment now in this Fragment i want to clear it and want to show Only one pin but it Still Showing 11 Marker over map . Here is my Source code: public class MapActivity extends FragmentActivity

Google Maps Android API v2 detect long press on map and add marker not working

戏子无情 提交于 2019-12-06 18:49:57
问题 I want to add a marker on map with long press. Toast in onMapClick() was display with normal tap. But long press is not working. Toast in onMapLongClick() is not displayed with long press. Also marker is not displayed on map. I'm using SupportMapFragment because I want to use my application on Android 2.x devices. I have tested my app on Nexus One which has Android version 2.3.7. This is my code. public class MainActivity extends FragmentActivity implements OnMapClickListener,

Using Two SupportMapFragment in one Activity but unable remove Marker from Second SupportMapFragment that i have added in First SupportMapFragment

谁都会走 提交于 2019-12-06 12:28:23
I have strange issue while using Two SupportMapFragment in two different Fragment in one Activity. Actually my problem is let say In OneFragment i have SupprtMapFragment added and i add 10 Marker in that map view and now i go to detail page by adding another Fragment and in that it have also SupprtMapFragment now in this Fragment i want to clear it and want to show Only one pin but it Still Showing 11 Marker over map . Here is my Source code: public class MapActivity extends FragmentActivity { private FragmentManager mFragmrg; public static String TAG_FRAGMENT_HOME="HomeFragment"; @Override

Google Maps API V2 android app on API level 8 up to 17

流过昼夜 提交于 2019-12-06 11:40:51
问题 I am working with the Google maps API V2 and it is going fine. i have a 2.2.2 android device wich i use to debug my app. now i just got a Galaxy Note 2, and when i try to debug on that device the app imidiatly crashed "project has stopped working". So i just made a small example to test with. and again it runs great on 2.2.2 but not on 4.1.1. this is the code i have for the small example exercise Any suggestions would be much appreciated My Layout <RelativeLayout xmlns:android="http://schemas

Android splash screen while loading MainActivity [duplicate]

谁说我不能喝 提交于 2019-12-06 08:42:33
问题 This question already has answers here : How do I make a splash screen? (32 answers) Closed 5 years ago . So, I just read this question: How do I make a splash screen? But instead of adding a fixed delay (like in the top answer), I wanted to keep the splash screen on while the MainActivity (with a MapFragment) loads. public class SplashScreen extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity

SupportMapFragment with navigationDrawer

て烟熏妆下的殇ゞ 提交于 2019-12-06 05:56:01
I have an activity that extends ActionBarActivity and has a navigation drawer. This is the xml layout of the activity: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <FrameLayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent"/> <fragment android:id="@+id/navigation_drawer" android:layout_width="@dimen

MapFragment causing NullPointerException at getMapAsync(this) method

一世执手 提交于 2019-12-05 02:50:09
I have implemented an activity which adds MapFragment at run time. The MapFragment xml has static fragment and I'm trying to get add at run time. Also I found there are some issues in Lollipop adding the map fragment at runtime. Kindly check Issue raised and temporary solution I have also given my codes below, fragment_map.xml <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".fragment.MapsFragment"> <fragment android:id="@+id/map" android

Issue while using 2 map fragments in One application

南笙酒味 提交于 2019-12-05 00:51:34
问题 I am trying to use two different Map Fragment in two different Fragment Activities. And as per the SupportMapFragment design, I am keeping the map key in the META TAG of the appilcation properties in Manifest file. However my Map view is not clearing, it is showing same map with old points in the second Fragment eventhough I am calling "getMap().clear()". Please suggest This is working fine untill and unless I dont use new MapFragment in a separate Activity, If I use new Mapfragment, it is