StreetViewPanoramaView

public class StreetViewPanoramaView extends FrameLayout

A View which displays a Street View panorama (with data obtained from the Google Maps service). When focused, it captures 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 SDK for Android does not support multiple StreetViewPanoramaView objects in one activity.

Inherited Constant Summary

Inherited Field Summary

Public Constructor Summary

StreetViewPanoramaView(Context context, AttributeSet attrs, int defStyle)

Public Method Summary

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.
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.
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.
void
onStart()
You must call this method from the parent Activity/Fragment's corresponding method.
void
onStop()
You must call this method from the parent Activity/Fragment's corresponding method.

Inherited Method Summary

Public Constructors

public StreetViewPanoramaView (Context context)

public StreetViewPanoramaView (Context context, AttributeSet attrs)

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

public StreetViewPanoramaView (Context context, StreetViewPanoramaOptions options)

Parameters
context The context that will show the view. Must not be null.
options Configuration options for the new view. The view will be configured with default values if options is null or any option field is left null.

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 never null.
Parameters
callback The callback object that will be triggered when the panorama is ready to be used. Must not be null.

public final void onCreate (Bundle savedInstanceState)

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

public 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 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.

public void onStart ()

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

public void onStop ()

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