0
我编程在Java类如何以编程方式添加谷歌地图到的FrameLayout
FrameLayout mf = new FrameLayout(this);
mf.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 200));
layContent.addView(mf);
取得了FrameLayout里,我想用这个FrameLayout里作秀GoogleMap的,这是我的GoogleMap
FragmentManager fm = getSupportFragmentManager();
SupportMapFragment supportMapFragment = SupportMapFragment.newInstance();
fm.beginTransaction().replace(xxxxxxx, supportMapFragment).commit();
代码
如果我使用的FrameLayout从.XML,我们可以在添加ID替换(XXXXX,但现在我用的FrameLayout编程,那么如何添加片段的GoogleMap以编程的FrameLayout?