当前位置: 首页>>代码示例>>Java>>正文


Java MapView.onResume方法代码示例

本文整理汇总了Java中com.google.android.gms.maps.MapView.onResume方法的典型用法代码示例。如果您正苦于以下问题:Java MapView.onResume方法的具体用法?Java MapView.onResume怎么用?Java MapView.onResume使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.gms.maps.MapView的用法示例。


在下文中一共展示了MapView.onResume方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createViewInstance

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
/**
 * Implementation of the react create view instance method - returns the map view to react.
 *
 * @param context
 * @return MapView
 */
@Override
protected MapView createViewInstance(ThemedReactContext context) {
    mapView = new MapView(context);

    mapView.onCreate(null);
    mapView.onResume();

    if (ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
        locationManager = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
    }

    reactContext = context;

    return mapView;
}
 
开发者ID:Pod-Point,项目名称:react-native-maps,代码行数:22,代码来源:PPTGoogleMapManager.java

示例2: onCreateView

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.location_fragment, container, false);

    mMapView = (MapView) rootView.findViewById(R.id.mapView);
    mMapView.onCreate(savedInstanceState);

    mMapView.onResume(); // needed to get the map to display immediately

    try {
        MapsInitializer.initialize(getActivity().getApplicationContext());
    } catch (Exception e) {
        e.printStackTrace();
    }

    mMapView.getMapAsync(new OnMapReadyCallback() {
        @Override
        public void onMapReady(GoogleMap mMap) {
            googleMap = mMap;
            refreshMap(null);
        }
    });

    return rootView;
}
 
开发者ID:gautamgitspace,项目名称:CellularNetworkMonitor,代码行数:26,代码来源:MapFragment.java

示例3: onCreateView

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
  View root = inflater.inflate(R.layout.fragment_detail_location, container, false);

  mMapView = (MapView) root.findViewById(R.id.mapView);

  mMapView.onCreate(savedInstanceState);
  mMapView.onResume();

  recycleView = (RecyclerView) root.findViewById(R.id.location_recycler_view);

  locationAdapter = new LocationAdapter(getActivity());
  recycleView.setAdapter(locationAdapter);
  recycleView.setLayoutManager(new LinearLayoutManager(getActivity()));

  return root;
}
 
开发者ID:nvh0412,项目名称:dealhunting,代码行数:19,代码来源:DetailLocationFragment.java

示例4: onCreateView

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_map, container, false);

    mapView = (MapView) v.findViewById(R.id.map);
    mapView.onCreate(savedInstanceState);

    mapView.onResume();// needed to get the googleMap to display immediately

    try {
        MapsInitializer.initialize(getActivity().getApplicationContext());
    } catch (Exception e) {
        e.printStackTrace();
    }

    mapView.getMapAsync(this);

    progressBar = (ProgressBar) v.findViewById(R.id.progressBar);
    emptyListTextView = (TextView) v.findViewById(R.id.emptyListText);

    mapUpdateHandler = new Handler();

    mapUpdater.run();

    return v;
}
 
开发者ID:Gaso-UFS,项目名称:gaso,代码行数:27,代码来源:MapGasoFragment.java

示例5: onCreateView

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    FrameLayout v = (FrameLayout) inflater.inflate(R.layout.fragment_map, container, false);

    mapView = (MapView) v.findViewById(R.id.map);
    mapView.onCreate(savedInstanceState);
    mapView.onResume();
    mapView.getMapAsync(new OnMapReadyCallback() {
        @Override
        public void onMapReady(GoogleMap googleMap) {
            Log.i("DevMsg", "Success!!!!!");
            myMap = googleMap;
            populateMap();
        }
    });


    return v;
}
 
开发者ID:danthedrummer,项目名称:HuddlOut_client,代码行数:22,代码来源:MapFragment.java

示例6: onResume

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Override
protected void onResume() {
    super.onResume();

    int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);

    if (resultCode == ConnectionResult.SUCCESS) {
        mRecyclerView.setAdapter(mListAdapter);
    } else {
        GooglePlayServicesUtil.getErrorDialog(resultCode, this, 1).show();
    }

    if (mListAdapter != null) {
        for (MapView m : mListAdapter.getMapViews()) {
            m.onResume();
        }
    }
}
 
开发者ID:mojosoeun,项目名称:Runch,代码行数:19,代码来源:RestaurantInfoActivity.java

示例7: setupMap

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
protected void setupMap(){
    // GoogleMapOptions to Set Map to Lite Mode
    GoogleMapOptions googleMapOptions = new GoogleMapOptions().liteMode(true);

    mMapView = new MapView(this, googleMapOptions);

    mMapView.setClickable(false);

    mMapView.setLayoutParams(new LinearLayout.LayoutParams(
            ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.MATCH_PARENT));
    mMapView.setMinimumHeight(MAP_HEIGHT);
    mMapContainer.addView(mMapView);
    mMapContainer.setMinimumHeight(MAP_HEIGHT);

    mMapView.onCreate(null);
    mMapView.onResume();
    mMapView.getMapAsync(this);
}
 
开发者ID:foxtrot94,项目名称:DotHike,代码行数:20,代码来源:ResultsActivity.java

示例8: onViewCreated

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    mMapView = (MapView) view.findViewById(R.id.mapView);
    mMapView.onCreate(savedInstanceState);
    mMapView.onResume();

    boolean isGooglePlayServicesAvailable = ConnectionResult.SUCCESS ==
            GooglePlayServicesUtil.isGooglePlayServicesAvailable(getActivity());

    if (isGooglePlayServicesAvailable) {
        setMap();
    } else {
        mMapView.setVisibility(View.GONE);
    }

    ListView listViewContacts = (ListView) view.findViewById(R.id.listview_contacts);
    listViewContacts.setAdapter(new ContactsAdapter(getActivity()));
}
 
开发者ID:CheDream-Android,项目名称:CheDream,代码行数:21,代码来源:ContactsFragment.java

示例9: onCreateView

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater,
    @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
  if (view != null) {
    ViewGroup parent = (ViewGroup) view.getParent();
    if (parent != null)
      parent.removeView(view);

  }
  view = inflater.inflate(R.layout.home_frg, container, false);
  mMapView = (MapView) view.findViewById(R.id.mapView);
  mMapView.onCreate(savedInstanceState);
  mMapView.onResume();

  try {
    MapsInitializer.initialize(context.getApplicationContext());
  } catch (Exception e) {
    e.printStackTrace();
  }
  initViews(view);
  return view;
}
 
开发者ID:liyaguang,项目名称:PalHunterClient,代码行数:23,代码来源:HomeFragment.java

示例10: onCreateView

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

	setActionBar();
	View view = inflater.inflate(R.layout.fragment_security, container, false);

	autoBlip = (ToggleButton) view.findViewById(R.id.toggle_blip);
	autoLocate = (ToggleButton) view.findViewById(R.id.toggle_locate);
	wipe = (Button) view.findViewById(R.id.wipe);
	wipeCache = (Button) view.findViewById(R.id.wipe_cache);

	mapView = (MapView) view.findViewById(R.id.mapView);
	mapView.onCreate(savedInstanceState);
	mapView.onResume();
	try {
		MapsInitializer.initialize(getActivity().getApplicationContext());
	} catch (Exception e) {
		e.printStackTrace();
	}
	map = mapView.getMap();
	setupMap();

	setupListeners();
	return view;
}
 
开发者ID:rachitmishra,项目名称:ceeq,代码行数:26,代码来源:SecurityFragment.java

示例11: onCreateView

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_map, container, false);

    mMapView = (MapView) rootView.findViewById(R.id.mapView);
    mMapView.onCreate(savedInstanceState);

    mMapView.onResume(); // needed to get the map to display immediately

    try {
        MapsInitializer.initialize(getActivity().getApplicationContext());
    } catch (Exception e) {
        e.printStackTrace();
    }

    mMapView.getMapAsync(new OnMapReadyCallback() {
        @Override
        public void onMapReady(GoogleMap mMap) {
            googleMap = mMap;

            // For dropping a marker at a point on the Map
            LatLng sydney = new LatLng(-34, 151);
            googleMap.addMarker(new MarkerOptions().position(sydney).title("Marker Title").snippet("Marker Description"));

            // For zooming automatically to the location of the marker
            CameraPosition cameraPosition = new CameraPosition.Builder().target(sydney).zoom(12).build();
            googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
        }
    });

    return rootView;
}
 
开发者ID:doljko,项目名称:youth-health,代码行数:33,代码来源:MapFragment.java

示例12: onViewCreated

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    mapView = (MapView) view.findViewById(R.id.map);
    mapView.onCreate(savedInstanceState);
    mapView.onResume();
    mapView.getMapAsync(this);
}
 
开发者ID:mremondi,项目名称:Hyke,代码行数:9,代码来源:NearMeFragment.java

示例13: buildMap

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
private void buildMap(View v, Bundle savedInstanceState) {
    mMapView = (MapView) v.findViewById(R.id.mapView);
    mMapView.onCreate(savedInstanceState);
    mMapView.onResume();

    try {
        MapsInitializer.initialize(getActivity().getApplicationContext());
    } catch (Exception e) {
        e.printStackTrace();
    }

    mMapView.getMapAsync(this);
}
 
开发者ID:cscd-488,项目名称:event-app,代码行数:14,代码来源:LocationMapFragment.java

示例14: MapHeaderHolder

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
public MapHeaderHolder(View v) {
	super(v);
	mapView = (MapView) v;
	// Call through onCreate and onResume because we had these already but the MapView did not yet exist then
	mapView.onCreate(null);
	mapView.onResume();
	mapView.getMapAsync(googleMap -> googleMap.getUiSettings().setMapToolbarEnabled(false));
}
 
开发者ID:erickok,项目名称:ratebeer,代码行数:9,代码来源:LocalPlacesAdapter.java

示例15: onCreateView

import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
                         @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_map, container, false);
    mMapView = (MapView) view.findViewById(R.id.mv_map);
    mMapView.onCreate(savedInstanceState);
    mMapView.onResume();
    mMapView.getMapAsync(this);
    return view;
}
 
开发者ID:jmarkstar,项目名称:TuristHelper,代码行数:12,代码来源:GoogleMapFragment.java


注:本文中的com.google.android.gms.maps.MapView.onResume方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。