0

我很绝望,因为当我在单击标记信息窗口后尝试打开新活动时,程序冻结并崩溃。

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

  (..........)

map.setOnInfoWindowClickListener(new OnInfoWindowClickListener() {

    public void onInfoWindowClick(Marker marker) {

        Intent x = new Intent(MainActivity.this, Second.class);
            x.putExtra(Name, Info);
            startActivity(x); 
           }
    });}
4

0 回答 0