Exemplo n.º 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());
  }
Exemplo n.º 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();
  }
Exemplo n.º 3
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   handler = new Handler();
 }
Exemplo n.º 4
0
 @Override
 public void onViewReady(View view, Bundle savedInstanceState, Reason reason) {
   super.onViewReady(view, savedInstanceState, reason);
   postEventV2V(new ChangeTitleEvent(this));
 }
Exemplo n.º 5
0
 @Override
 public void onDestroy() {
   super.onDestroy();
 }
Exemplo n.º 6
0
 @Override
 public void onResume() {
   super.onResume();
   Toolbar toolbar = (Toolbar) getView().findViewById(R.id.toolbar);
   toolbar.setTitle(getClass().getSimpleName());
 }