title: How to post event from adapter to activity using otto
body: <p><strong>Edited:</strong> Don't suggest Interface, please.<br/>
  I have an Activity with a RecyclerView inside. I want post an event from Adapter to Activity by otto, when Adapter will be created. I used following code: <br/>
  <strong>ShoppingCardAdapter</strong><br/>
  </p>
  
  <pre><code>public class ShoppingCardAdapter extends  RecyclerView.Adapter&lt;ShoppingCardAdapter.ViewHolder&gt; {
  
  private Activity activity;
  private CardBook cardbook;
  
  public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
      public TextView tvBookName;
      public ViewHolder(View v) {
          super(v);
          tvBookName = (TextView) itemView.findViewById(R.id.tv_book_name);
      }
  
      @Override
      public void onClick(View view) {
                  setTotalFactor();
      }
  
  }
  
  public ShoppingCardAdapter(Activity activity, Realm realm) {
      this.activity = activity;
      dataSet = realm.where(CardBook.class).equalTo("userId", userId).findAll();
      setTotalFactor();
  }
  
  @Override
  public ShoppingCardAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,
                                                 int viewType) {
      View v = LayoutInflater.from(parent.getContext())
              .inflate(R.layout.shopping_card_item, parent, false);
      ViewHolder vh = new ViewHolder(v);
      return vh;
  }
  
  @Override
  public void onBindViewHolder(ViewHolder holder, int position) {
      CardBook cardBook = dataSet.get(position);
      holder.tvBookName.setText(cardBook.getName());
  
  }
  
  @Override
  public int getItemCount() {
      return dataSet.size();
  }
  
  private void setTotalFactor() {
      BusProvider.getInstance().post(new ShoppingCardBooksChangeEvent(dataSet.size(), String.valueOf(dataSet.sum("price"))));
  }}
  </code></pre>
  
  <p><br/>
  in <strong>ShoppingCardActivity</strong><br/>
  </p>
  
  <pre><code>    @Subscribe
  public void shoppingCardBooksChanged (ShoppingCardBooksChangeEvent shoppingCardBooksChangeEvent) {
      Log.i("OTTO TEST", "come on :)");
  }
  @Override protected void onResume() {
      super.onResume();
      BusProvider.getInstance().register(this);
      checkBuyValidation();
  }
  
  @Override protected void onPause() {
      super.onPause();
      BusProvider.getInstance().unregister(this);
  }
  </code></pre>
  
  <p><br/>
  why Log doesn't show up?</p>