Example #1
0
  @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());
  }
Example #2
0
  @Override
  public void onViewReady(View view, Bundle savedInstanceState, Reason reason) {
    super.onViewReady(view, savedInstanceState, reason);

    next = (Button) view.findViewById(R.id.button_next);
    next.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            navigationController.navigateTo(v, getNextFragmentLocId());
          }
        });

    clear = (Button) view.findViewById(R.id.button_clear);
    clear.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            navigationController.navigateBack(view, null);
          }
        });

    anotherController.populateData();
  }
Example #3
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   handler = new Handler();
 }
Example #4
0
 @Override
 public void onViewReady(View view, Bundle savedInstanceState, Reason reason) {
   super.onViewReady(view, savedInstanceState, reason);
   postEventV2V(new ChangeTitleEvent(this));
 }
Example #5
0
 @Override
 public void onDestroy() {
   super.onDestroy();
 }
Example #6
0
 @Override
 public void onResume() {
   super.onResume();
   Toolbar toolbar = (Toolbar) getView().findViewById(R.id.toolbar);
   toolbar.setTitle(getClass().getSimpleName());
 }