0
他のバージョン(私はエミュレータでテストしています)では、このコードは完全に動作しますが、私の場合(YotaPhone 2、Marshmallow)は動作を拒否しました。問題はバージョン6.0でmarshmallowは機能しません。OnInfoWindowClickListner
googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {
@Override
public void onInfoWindowClick(Marker marker) {
Log.d(LOG_TAG, "onInfoWindowClick");
OneStationFragment oneStationFragment = new OneStationFragment();
LatLng currentPosition = marker.getPosition();
Bundle bundle = new Bundle();
bundle.putString("address", marker.getTitle());
bundle.putDouble("latitude", currentPosition.latitude);
bundle.putDouble("longitude", currentPosition.longitude);
oneStationFragment.setArguments(bundle);
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
fragmentTransaction.hide(StationsMapFragment.this);
fragmentTransaction.addToBackStack("StationMap");
fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
fragmentTransaction.add(R.id.content_frame, oneStationFragment);
fragmentTransaction.commit();
}
});
googleMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {
@Override
public View getInfoWindow(Marker marker) {
return null;
}
@Override
public View getInfoContents(Marker marker) {
Log.d(LOG_TAG, "getInfoContents");
View v = View.inflate(getContext(), R.layout.custom_text_for_marker, null);
TextView title = (TextView) v.findViewById(R.id.title_marker_info);
TextView snippet = (TextView) v.findViewById(R.id.snippet_marker_info);
title.setText(marker.getTitle());
snippet.setText("Информация о станции");
return v;
}
});
ただ停止します。プラスは私の出発点を拒否しました。私はこの
W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:2
I/DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 2
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000004/n/armeabi