本文整理了Java中com.google.android.gms.maps.SupportMapFragment.<init>()
方法的一些代码示例,展示了SupportMapFragment.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SupportMapFragment.<init>()
方法的具体详情如下:
包路径:com.google.android.gms.maps.SupportMapFragment
类名称:SupportMapFragment
方法名:<init>
暂无
代码示例来源:origin: Michenux/YourAppIdea
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
SupportMapFragment mapFragment = getMapFragment();
if (BuildConfig.DEBUG) {
Log.d(YourApplication.LOG_TAG, "simpleMapFragment.onViewCreated - mapFragment = " + mapFragment);
}
if (mapFragment == null) {
mapFragment = new SupportMapFragment();
mapFragment.setRetainInstance(true);
getChildFragmentManager().beginTransaction().replace(R.id.simplemap, mapFragment, null).commit();
}
mapFragment.getMapAsync(this);
}
代码示例来源:origin: polyak01/IconSwitch
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
window = getWindow();
initColors();
initAnimationRelatedFields();
content = findViewById(R.id.content);
toolbar = findViewById(R.id.toolbar);
TextView title = (TextView) findViewById(R.id.toolbar_title);
title.setText(R.string.app_name);
iconSwitch = (IconSwitch) findViewById(R.id.icon_switch);
iconSwitch.setCheckedChangeListener(this);
updateColors(false);
FragmentManager fm = getSupportFragmentManager();
SupportMapFragment fragment = (SupportMapFragment) fm.findFragmentById(R.id.map_container);
if (fragment == null) {
fragment = new SupportMapFragment();
fm.beginTransaction().replace(R.id.map_container, fragment).commit();
}
fragment.getMapAsync(this);
findViewById(R.id.credit_polyak).setOnClickListener(this);
findViewById(R.id.credit_yarolegovich).setOnClickListener(this);
findViewById(R.id.credit_prokhoda).setOnClickListener(this);
}
内容来源于网络,如有侵权,请联系作者删除!