@Override public void onViewReady(View view, Bundle savedInstanceState, Reason reason) { super.onViewReady(view, savedInstanceState, reason); ButterKnife.bind(this, view); increment.setOnTouchListener( new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: startContinuousIncrement(); break; case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: stopContinuousIncrement(); break; } return false; } }); decrement.setOnTouchListener( new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: startContinuousIncrement(); break; case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: stopContinuousIncrement(); break; } return false; } }); autoIncrement.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { // Intent intent = new Intent(getActivity(),Count) } }); updateCountDisplay(counterController.getModel().getCount()); }
@Override public boolean onBackButtonPressed() { counterController.goBackToTheBasicView(this); return true; }