本文整理汇总了Java中com.google.android.gms.maps.SupportMapFragment.newInstance方法的典型用法代码示例。如果您正苦于以下问题:Java SupportMapFragment.newInstance方法的具体用法?Java SupportMapFragment.newInstance怎么用?Java SupportMapFragment.newInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.gms.maps.SupportMapFragment
的用法示例。
在下文中一共展示了SupportMapFragment.newInstance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getItem
import com.google.android.gms.maps.SupportMapFragment; //导入方法依赖的package包/类
@Override
public Fragment getItem(int position) {
Log.v(TAG, "getItem, position = " + position);
// getItem is called to instantiate the fragment for the given page.
// Return a PlaceholderFragment (defined as a static inner class below).
switch (position) {
case 0:
return FeedListFragment.newInstance();
case 1:
return RepositoriesListFragment.newInstance();
case 2:
return FollowingListFragment.newInstance();
case 3:
return FollowersListFragment.newInstance();
case 4:
return StarsListFragment.newInstance();
case 5:
LocationsReadyCallback callback = new LocationsReadyCallback(GeneralActivity.this);
SupportMapFragment fragment = SupportMapFragment.newInstance();
fragment.getMapAsync(callback);
return fragment;
}
return PlaceholderFragment.newInstance(position + 1);
}
示例2: newMapFragment
import com.google.android.gms.maps.SupportMapFragment; //导入方法依赖的package包/类
private static SupportMapFragment newMapFragment() {
return SupportMapFragment.newInstance(new GoogleMapOptions()
.camera(new CameraPosition.Builder()
.target(LocationAdapter.ZERO)
.zoom(DEFAULT_ZOOM)
.build()));
}