caller and receiver for red buttons */ public interface RedButtonListener { void onRedButtonClick(); } @Override public void onRedButtonClick() { Toast.makeText(this, R.string.red_button_clicked, Toast.LENGTH_SHORT).show(); } in Activity redButtonListener.onRedButtonClick(); in Fragment RedButtonListener.java
no longer the orchestrator. Activity ListFragment Waiver VehicleSelected manually Previous - Use Interface Now - No Interface Activity ListFragment Waiver Fragment fragments know of activity activity is simply a container Otto Otto moves messages to and from subscribers (observer pattern / event bus)