我很绝望,因为当我在点击标记信息窗口后尝试打开一个新活动时,该程序会冻结并崩溃。
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);
}
});}