本文整理匯總了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()));
}