/**
 * Copyright (C) 2015 android10.org. All rights reserved.
 * @author Fernando Cejas (the android10 coder)
 */
package com.fernandocejas.android10.rx.sample.activity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import butterknife.ButterKnife;
import com.fernandocejas.android10.rx.sample.R;
import rx.Subscription;
import rx.subscriptions.Subscriptions;

public class SampleActivityObservableTransfor extends Activity {

  private Subscription subscription;

  public static Intent getCallingIntent(Context context) {
    return new Intent(context, SampleActivityObservableTransfor.class);
  }

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_sample_observervable_transform);

    ButterKnife.inject(this);
    initialize();
  }

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

  private void initialize() {
    this.subscription = Subscriptions.empty();
  }
}

@@ -282,16 +282,46 @@
 Bundle;%0A
+import android.widget.Button;%0A
 import b
@@ -355,177 +355,444 @@
 ort 
-com.fernandocejas.android10.rx.sample.R;%0Aimport rx.Subscription;%0Aimport rx.subscriptions.Subscriptions;%0A%0Apublic class SampleActivityObservableTransfor extends Activity %7B
+butterknife.InjectView;%0Aimport butterknife.OnClick;%0Aimport com.fernandocejas.android10.rx.sample.R;%0Aimport com.fernandocejas.android10.rx.sample.data.DataManager;%0Aimport rx.Subscription;%0Aimport rx.subscriptions.Subscriptions;%0A%0Apublic class SampleActivityObservableTransfor extends Activity %7B%0A%0A  @InjectView(R.id.btn_flatMap) Button btn_flatMap;%0A  @InjectView(R.id.btn_concatMap) Button btn_concatMap;%0A%0A  private DataManager dataManager;
 %0A%0A  
@@ -1382,11 +1382,133 @@
 y();%0A  %7D
+%0A%0A  @OnClick(R.id.btn_flatMap) void onFlatMapClick() %7B%0A%0A  %7D%0A%0A  @OnClick(R.id.btn_concatMap) void onConcatMapClick() %7B%0A%0A  %7D
 %0A%7D%0A

Add click events for buttons.