com.google.android.gms.maps.StreetViewPanoramaView Java Examples
The following examples show how to use
com.google.android.gms.maps.StreetViewPanoramaView.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StreetViewPanoramaViewDemoActivity.java From android-samples with Apache License 2.0 | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); StreetViewPanoramaOptions options = new StreetViewPanoramaOptions(); if (savedInstanceState == null) { options.position(SYDNEY); } streetViewPanoramaView = new StreetViewPanoramaView(this, options); addContentView(streetViewPanoramaView, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); // *** IMPORTANT *** // StreetViewPanoramaView requires that the Bundle you pass contain _ONLY_ // StreetViewPanoramaView SDK objects or sub-Bundles. Bundle streetViewBundle = null; if (savedInstanceState != null) { streetViewBundle = savedInstanceState.getBundle(STREETVIEW_BUNDLE_KEY); } streetViewPanoramaView.onCreate(streetViewBundle); }
Example #2
Source File: MapFragment.java From AndroidDemoProjects with Apache License 2.0 | 6 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup parent = (ViewGroup) super.onCreateView( inflater, container, savedInstanceState ); View overlay = inflater.inflate( R.layout.view_map_overlay, parent, false ); mIndoorSelector = (SeekBar) overlay.findViewById( R.id.indoor_level_selector ); mIndoorMinLevel = (TextView) overlay.findViewById( R.id.indoor_min_level ); mIndoorMaxLevel = (TextView) overlay.findViewById( R.id.indoor_max_level ); mStreetViewPanoramaView = (StreetViewPanoramaView) overlay.findViewById(R.id.steet_view_panorama); mStreetViewPanoramaView.onCreate(savedInstanceState); parent.addView(overlay); return parent; }
Example #3
Source File: LotInfoFragment.java From android with MIT License | 4 votes |
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); final Bundle args = getArguments(); mId = args.getString(Const.BundleKeys.MARKER_ID); mTitle = args.getString(Const.BundleKeys.MARKER_TITLE); isExpanded = args.getBoolean(Const.BundleKeys.IS_EXPANDED, false); mLatLng = new LatLng(args.getDouble(Const.BundleKeys.LATITUDE), args.getDouble(Const.BundleKeys.LONGITUDE)); final View view = inflater.inflate( isExpanded ? R.layout.fragment_lot_details : R.layout.fragment_lot_info, container, false); vTitle = (TextView) view.findViewById(R.id.title); vRemainingTime = (TextView) view.findViewById(R.id.remaining_time); vRemainingTimePrefix = (TextView) view.findViewById(R.id.remaining_time_prefix); vPrice = view.findViewById(R.id.price); vCapacity = (TextView) view.findViewById(R.id.capacity); vInfoBtn = (Button) view.findViewById(R.id.btn_info); vProgressBar = view.findViewById(R.id.progress); vRecyclerView = (RecyclerView) view.findViewById(R.id.recycler); vMainPrice = (TextView) view.findViewById(R.id.main_price); vHourlyPrice = (TextView) view.findViewById(R.id.hourly_price); vStreetViewPanoramaView = (StreetViewPanoramaView) view.findViewById(R.id.street_view_panorama); vStreetViewDelayFix = view.findViewById(R.id.destreet_view_delay_fix); mAdapter = new LotAgendaListAdapter(getContext(), R.layout.list_item_lot_agenda); if (vStreetViewPanoramaView != null) { // StreetView instance must be saved in a separate Bundle final Bundle streetViewSavedInstanceState = (savedInstanceState != null) ? savedInstanceState.getBundle(Const.BundleKeys.STREET_VIEW_FIX) : null; vStreetViewPanoramaView.onCreate(streetViewSavedInstanceState); if (streetViewSavedInstanceState != null) { // When restoring instance, the delayFix view is not needed // vStreetViewDelayFix.setVisibility(View.GONE); } } setupLayout(view); downloadData(getActivity(), mId); return view; }