@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_restart: mCustomCardsAdapter.clearCards(); mMainCardsPresenter.setView(this); return true; } return super.onOptionsItemSelected(item); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ButterKnife.bind(this); setSupportActionBar(mToolbar); initialiseCards(); mMainCardsPresenter = new MainCardsPresenter(); mMainCardsPresenter.setView(this); }