package com.sdoward.rxgooglemaps;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;

import com.google.android.gms.maps.*;
import com.google.android.gms.maps.model.*;
import com.sdoward.rxgooglemap.MapObservableProvider;

import rx.functions.Action1;
import rx.subscriptions.*;

public class MapsActivity extends FragmentActivity {

    private SupportMapFragment mapFragment;
    private MapObservableProvider mapObservableProvider;
    private CompositeSubscription subscriptions = Subscriptions.from();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_maps);
        mapFragment = (SupportMapFragment) getSupportFragmentManager()
                .findFragmentById(R.id.map);
        mapObservableProvider = new MapObservableProvider(mapFragment);
        subscriptions.add(mapObservableProvider.getMapReadyObservable()
                .subscribe(new Action1<GoogleMap>() {
                    @Override
                    public void call(GoogleMap googleMap) {
                        Log.d(MapsActivity.class.getName(), "map ready");
                    }
                }));
        subscriptions.add(mapObservableProvider.getMapLongClickObservable()
                .subscribe(new Action1<LatLng>() {
                    @Override
                    public void call(LatLng latLng) {
                        Log.d(MapsActivity.class.getName(), "map long click");
                    }
                }));
        subscriptions.add(mapObservableProvider.getMapClickObservable()
                .subscribe(new Action1<LatLng>() {
                    @Override
                    public void call(LatLng latLng) {
                        Log.d(MapsActivity.class.getName(), "map click");
                    }
                }));
        subscriptions.add(mapObservableProvider.getCameraChangeObservable().subscribe(new Action1<CameraPosition>() {
            @Override
            public void call(CameraPosition cameraPosition) {
                Log.d(MapsActivity.class.getName(), "camera position changed");
            }
        }));
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        subscriptions.unsubscribe();
    }
}

@@ -1966,16 +1966,33 @@
 rvable()
+%0A                
 .subscri
@@ -2030,32 +2030,40 @@
 ) %7B%0A            
+        
 @Override%0A      
@@ -2060,32 +2060,40 @@
 ide%0A            
+    
+    
 public void call
@@ -2122,24 +2122,32 @@
 Position) %7B%0A
+        
             
@@ -2218,34 +2218,50 @@
 %22);%0A            
-%7D%0A
+        %7D%0A        
         %7D));%0A   

Break subscribe to new line