@Override
  public void onFocusChanged(View view, boolean hasFocus) {
    ViewFlipper vf = (ViewFlipper) view.findViewById(R.id.viewflipper1);
    if (hasFocus) {
      if (vf.getCurrentView().getId() != R.id.view2) {
        vf.showNext();
      }
    } else {
      if (vf.getCurrentView().getId() != R.id.view1) {
        vf.showPrevious();
      }

      needScrollCorrection = true;
    }
  }
コード例 #2
0
  void showIssues() {
    if (flipper.getCurrentView() != flipper.getChildAt(1)) {
      flipper.setInAnimation(getContext(), R.anim.slide_in_right);
      flipper.setOutAnimation(getContext(), R.anim.slide_out_left);
      flipper.showPrevious();
    }

    disambigHeading.setTypeface(null, Typeface.NORMAL);
    disambigHeading.setEnabled(true);
    issuesHeading.setTypeface(null, Typeface.BOLD);
    issuesHeading.setEnabled(false);
  }
コード例 #3
0
ファイル: TuiJianActivity.java プロジェクト: niuyi/PPTVTest2
 private void changeDisplay() {
   ImageDescriptionHolder holder = (ImageDescriptionHolder) viewFlipper.getCurrentView().getTag();
   imageDescriptionTextView.setText(holder.description);
   testView.setTotalAndIndex(imageDescription.length, holder.index);
 }