/** * Create an observable which emits when {@link StreetViewPanorama} is ready to use. * <p> * <em>Warning:</em> The created observable keeps a strong reference to {@code * streetViewPanoramaView}. Unsubscribe to free this reference. * </p> */ @CheckResult @NonNull public static Observable<StreetViewPanorama> streetViewPanoramaReady( @NonNull StreetViewPanoramaView streetViewPanoramaView) { checkNotNull(streetViewPanoramaView, "streetViewPanoramaView == null"); return Observable.create( new StreetViewPanoramaViewPanoramaReadyOnSubscribe(streetViewPanoramaView)); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); StreetViewPanoramaOptions options = new StreetViewPanoramaOptions(); if (savedInstanceState == null) { options.position(SYDNEY); } svpView = new StreetViewPanoramaView(this, options); addContentView(svpView, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); svpView.onCreate(savedInstanceState); }
StreetViewPanoramaViewPanoramaReadyOnSubscribe(StreetViewPanoramaView view) { this.view = view; }