前提・実現したいこと
Google APIs for Androidのリファレンスを理解したい。
onMapReady(GoogleMap)がいつ呼ばれるかしりたい。
発生している問題・エラーメッセージ
Google APIs for AndroidのOnMapReadyCallbackのリファレンスに Once an instance of this interface is set on a MapFragment or MapView object, the onMapReady(GoogleMap) method is triggered when the map is ready to be used and provides a non-null instance of GoogleMap. と書いてありますが、インターフェースのインスタンス(インターフェースを継承した匿名クラス?)は下記のコードのどこで作られているんでしょうか?
該当のソースコード
java
1public class MapsActivity extends FragmentActivity implements OnMapReadyCallback { 2 3 private GoogleMap mMap; 4 5 @Override 6 protected void onCreate(Bundle savedInstanceState) { 7 super.onCreate(savedInstanceState); 8 setContentView(R.layout.activity_maps); 9 10 11 // Obtain the SupportMapFragment and get notified when the map is ready to be used.ここでしょうか? 12 SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map); 13 mapFragment.getMapAsync(this); 14 //This class automatically initializes the maps system and the view. 15 }
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/04/17 13:41 編集
2019/04/17 13:53
2019/04/18 01:52 編集
2019/04/18 02:00 編集
2019/04/18 03:22