public class

StreetViewPanoramaView

extends FrameLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.google.android.gms.maps.StreetViewPanoramaView

Class Overview

A View which displays a Street View panorama (with data obtained from the Google Maps service). When focused, it will capture keypresses and touch gestures to move the panorama.

Users of this class must forward all the life cycle methods from the Activity or Fragment containing this view to the corresponding ones in this class. In particular, you must forward the following methods:

A StreetViewPanorama must be acquired using getStreetViewPanoramaAsync(OnStreetViewPanoramaReadyCallback). The StreetViewPanoramaView automatically initializes the Street View system and the view.

For a simpler method of displaying a StreetViewPanorama use StreetViewPanoramaFragment (or SupportStreetViewPanoramaFragment) if you are looking to target earlier platforms.

Note: You are advised not to add children to this view.

Note: The Google Maps Android API does not support multiple StreetViewPanoramaView objects in one activity.

Summary

[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
StreetViewPanoramaView(Context context)
StreetViewPanoramaView(Context context, AttributeSet attrs)
StreetViewPanoramaView(Context context, AttributeSet attrs, int defStyle)
StreetViewPanoramaView(Context context, StreetViewPanoramaOptions options)
Public Methods
void getStreetViewPanoramaAsync(OnStreetViewPanoramaReadyCallback callback)
Sets a callback object which will be triggered when the StreetViewPanorama instance is ready to be used.
final void onCreate(Bundle savedInstanceState)
You must call this method from the parent Activity/Fragment's corresponding method.
final void onDestroy()
You must call this method from the parent Activity/Fragment's corresponding method.
final void onLowMemory()
You must call this method from the parent Activity/Fragment's corresponding method.
final void onPause()
You must call this method from the parent Activity/Fragment's corresponding method.
final void onResume()
You must call this method from the parent Activity/Fragment's corresponding method.
final void onSaveInstanceState(Bundle outState)
You must call this method from the parent Activity/Fragment's corresponding method.
[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.view.ViewParent
From interface android.view.ViewManager
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public StreetViewPanoramaView (Context context)

Parameters
context Context

public StreetViewPanoramaView (Context context, AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

public StreetViewPanoramaView (Context context, AttributeSet attrs, int defStyle)

Parameters
context Context
attrs AttributeSet
defStyle int

public StreetViewPanoramaView (Context context, StreetViewPanoramaOptions options)

Parameters
context Context
options StreetViewPanoramaOptions

Public Methods

public void getStreetViewPanoramaAsync (OnStreetViewPanoramaReadyCallback callback)

Sets a callback object which will be triggered when the StreetViewPanorama instance is ready to be used.

Note that:

  • In the case where Google Play services is not installed on the user's device, the callback will not be triggered until the user installs it.
  • The callback will be executed in the main thread.
  • The StreetViewPanorama object provided by the callback is non-null.

Parameters
callback OnStreetViewPanoramaReadyCallback: The callback object that will be triggered when the panorama is ready to be used.

public final void onCreate (Bundle savedInstanceState)

You must call this method from the parent Activity/Fragment's corresponding method.

Parameters
savedInstanceState Bundle

public final void onDestroy ()

You must call this method from the parent Activity/Fragment's corresponding method.

public final void onLowMemory ()

You must call this method from the parent Activity/Fragment's corresponding method.

public final void onPause ()

You must call this method from the parent Activity/Fragment's corresponding method.

public final void onResume ()

You must call this method from the parent Activity/Fragment's corresponding method.

public final void onSaveInstanceState (Bundle outState)

You must call this method from the parent Activity/Fragment's corresponding method.

Parameters
outState Bundle