1

こんにちは、Android の Google マップの情報ウィンドウについて質問があります。

 @Override
        public View getInfoWindow(Marker arg0) {
            return null;
        }

この写真のように メニュー付きの情報ウィンドウ

その中に他のメニューがある情報ウィンドウを作りたいです。[道順] をクリックすると Google マップが表示され、別のテキストをクリックすると別のアクティビティが表示されます。私はグールマップのJavaScriptからその写真を知っています

 @Override
        public View getInfoWindow(Marker arg0) {
            return null;
        }
4

1 に答える 1

2

これはできません。

ドキュメントから

The info window that is drawn is not a live view. The view is rendered as an image (using View.draw(Canvas)) at the time it is returned. This means that any subsequent changes to the view will not be reflected by the info window on the map. To update the info window later (for example, after an image has loaded), call showInfoWindow(). Furthermore, the info window will not respect any of the interactivity typical for a normal view such as touch or gesture events. However you can listen to a generic click event on the whole info window as described in the section below.

したがって、ウィンドウはアクティブなビューではなく、単なる画像です。情報ウィンドウがクリックされたときにダイアログを表示するのが最善です

于 2013-10-09T15:31:34.823 に答える