use of com.google.android.gms.maps.MapView in project codenameone-google-maps by codenameone.
the class InternalNativeMapsImpl method initMaps.
private static void initMaps() {
if (!initialized) {
initialized = true;
try {
// this triggers the creation of the maps so they are ready when the peer component is invoked
MapsInitializer.initialize(AndroidNativeUtil.getActivity());
MapView v = new MapView(AndroidNativeUtil.getActivity());
v.onCreate(AndroidNativeUtil.getActivationBundle());
v.onResume();
// v.getMap();
} catch (Exception e) {
supported = false;
System.out.println("Failed to initialize, google play services not installed: " + e);
e.printStackTrace();
}
}
}
use of com.google.android.gms.maps.MapView in project Remindy by abicelis.
the class EditLocationBasedReminderFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_edit_location_based_reminder, container, false);
mPlace = (Spinner) rootView.findViewById(R.id.fragment_edit_location_based_reminder_place);
mMapView = (MapView) rootView.findViewById(R.id.fragment_edit_location_based_reminder_map);
mAddress = (TextView) rootView.findViewById(R.id.fragment_edit_location_based_reminder_address);
mEntering = (CheckBox) rootView.findViewById(R.id.fragment_edit_location_based_reminder_entering);
mExiting = (CheckBox) rootView.findViewById(R.id.fragment_edit_location_based_reminder_exiting);
mMapView.setClickable(false);
mEntering.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mReminder.setTriggerEntering(isChecked);
}
});
mExiting.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mReminder.setTriggerExiting(isChecked);
}
});
setupSpinners();
setReminderValues();
// Initialise the MapView
mMapView.onCreate(null);
// Set the map ready callback to receive the GoogleMap object
mMapView.getMapAsync(this);
return rootView;
}
use of com.google.android.gms.maps.MapView in project wire-android by wireapp.
the class LocationFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup viewGroup, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_location, viewGroup, false);
toolbar = ViewUtils.getView(view, R.id.t_location_toolbar);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (getActivity() == null) {
return;
}
getControllerFactory().getLocationController().hideShareLocation(null);
}
});
toolbarTitle = ViewUtils.getView(view, R.id.tv__location_toolbar__title);
selectedLocationBackground = ViewUtils.getView(view, R.id.iv__selected_location__background);
selectedLocationPin = ViewUtils.getView(view, R.id.gtv__selected_location__pin);
selectedLocationDetails = ViewUtils.getView(view, R.id.ll_selected_location_details);
selectedLocationDetails.setVisibility(View.INVISIBLE);
touchRegisteringFrameLayout = ViewUtils.getView(view, R.id.trfl_location_touch_registerer);
touchRegisteringFrameLayout.setTouchCallback(this);
requestCurrentLocationButton = ViewUtils.getView(view, R.id.gtv__location__current__button);
requestCurrentLocationButton.setOnClickListener(this);
sendCurrentLocationButton = ViewUtils.getView(view, R.id.ttv__location_send_button);
sendCurrentLocationButton.setOnClickListener(this);
selectedLocationAddress = ViewUtils.getView(view, R.id.ttv__location_address);
final Bundle mapViewSavedInstanceState = savedInstanceState != null ? savedInstanceState.getBundle(MAP_VIEW_SAVE_STATE) : null;
mapView = ViewUtils.getView(view, R.id.mv_map);
mapView.onCreate(mapViewSavedInstanceState);
mapView.getMapAsync(this);
return view;
}
Aggregations