public void showConfirmationField() {
   if (!firstIsShown) {
     return;
   }
   flipper.setInAnimation(pushLeftIn);
   flipper.setOutAnimation(pushLeftOut);
   flip();
 }
Ejemplo n.º 2
0
 /** 向右滑动 */
 protected void moveColRight() {
   if (viewFlipper.getDisplayedChild() == 1) {
     viewFlipper.setInAnimation(rightIn);
     viewFlipper.setOutAnimation(rightOut);
     viewFlipper.showPrevious();
     preView.setImageResource(R.drawable.page_arrow_02);
   }
 }
Ejemplo n.º 3
0
 /** 向左滑动 */
 protected void moveColLeft() {
   if (viewFlipper.getDisplayedChild() == 0) {
     viewFlipper.setInAnimation(leftIn);
     viewFlipper.setOutAnimation(leftOut);
     viewFlipper.showNext();
     preView.setImageResource(R.drawable.page_arrow_01);
   }
 }
 public void showNewPasswordField() {
   if (firstIsShown) {
     return;
   }
   flipper.setInAnimation(pushRightIn);
   flipper.setOutAnimation(pushRightOut);
   flip();
 }
Ejemplo n.º 5
0
 // back
 public void backtoFirst() {
   if (mGrid.isFocused()) {
     return;
   }
   setTitle(title);
   setPosition(true);
   flipper.setInAnimation(inFromLeftAnimation());
   flipper.setOutAnimation(outToRightAnimation());
   flipper.showPrevious();
 }
Ejemplo n.º 6
0
  public void previous(View view) {
    if (index >= 0) {
      mViewFlipper.setInAnimation(customAnimation.inFromLeftAnimation());
      mViewFlipper.setOutAnimation(customAnimation.outToRightAnimation());

      mViewFlipper.showPrevious();
      index--;
      ToggleRadioButton();
    }
  }
Ejemplo n.º 7
0
 /**
  * 移动到上一个月
  *
  * @param gvFlag
  */
 private void enterPrevMonth(int gvFlag, ViewFlipper flipper, View view) {
   jumpMonth--; // 上一个月
   gvFlag++;
   addGridView(flipper, view, gvFlag);
   flipper.setInAnimation(AnimationUtils.loadAnimation(context, R.anim.fragment_slide_left_enter));
   flipper.setOutAnimation(
       AnimationUtils.loadAnimation(context, R.anim.fragment_slide_right_exit));
   flipper.showPrevious();
   flipper.removeViewAt(0);
 }
Ejemplo n.º 8
0
  public void next(View view) {
    if (index < mViewFlipper.getChildCount()) {
      mViewFlipper.setInAnimation(customAnimation.inFromRightAnimation());
      mViewFlipper.setOutAnimation(customAnimation.outToLeftAnimation());

      mViewFlipper.showNext();
      index++;

      ToggleRadioButton();
    }
  }
Ejemplo n.º 9
0
 private void setupView() {
   // 获取控件的引用
   vfContainer = (ViewFlipper) findViewById(R.id.vfContainer);
   // 为其添加childView
   vfContainer.addView(createView(1));
   vfContainer.addView(createView(2));
   vfContainer.addView(createView(3));
   // 设置 过场动画
   vfContainer.setInAnimation(this, android.R.anim.fade_in);
   vfContainer.setOutAnimation(this, android.R.anim.fade_out);
 }
Ejemplo n.º 10
0
 /** 初始化组件,滚动数据 */
 public void initRollingText() {
   ViewFlipper mFlipper = ((ViewFlipper) this.findViewById(R.id.notice_other_flipper));
   String str[] = splitStr(Constants.NEWS, 23);
   for (int i = 0; i < str.length; i++) {
     mFlipper.addView(addTextByText(str[i]));
   }
   mFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_in));
   mFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_out));
   mFlipper.startFlipping();
   mFlipper.setOnClickListener(filterclick);
 }
Ejemplo n.º 11
0
  private void init(ViewGroup parent, int orientation) {
    showBox_Type = orientation;

    flipper =
        (ViewFlipper)
            LayoutInflater.from(mPage.getRawContext()).inflate(R.layout.uishowbox, this, false);
    this.addView(flipper);

    LinearLayout.LayoutParams params =
        new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);

    setLayoutParams(params);

    if (showBox_Type == UISHOWBOX_H) {
      flipper.setInAnimation(mPage.getRawContext(), R.anim.push_left_in);
      flipper.setOutAnimation(mPage.getRawContext(), R.anim.push_left_out);
    } else {
      flipper.setInAnimation(mPage.getRawContext(), R.anim.push_top_in);
      flipper.setOutAnimation(mPage.getRawContext(), R.anim.push_top_out);
    }
  }
  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);
  }
Ejemplo n.º 13
0
 @Override
 public void onItemSelected(AdapterView<?> parent, View v, int position, long id) {
   switch (position) {
     case 0:
       mFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_in));
       mFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_up_out));
       break;
     case 1:
       mFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.push_left_in));
       mFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.push_left_out));
       break;
     case 2:
       mFlipper.setInAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_in));
       mFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, android.R.anim.fade_out));
       break;
     default:
       mFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.hyperspace_in));
       mFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.hyperspace_out));
       break;
   }
 }
Ejemplo n.º 14
0
 @Override
 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
   LogUtil.logAnyTime(TAG, "onFling");
   if (showBox_Type == UISHOWBOX_H) {
     if (e1.getX() > e2.getX()) { // move to left
       flipper.showNext();
       currentIndex += 1;
       if (currentIndex == uris.size()) {
         currentIndex = 0;
       }
     } else if (e1.getX() < e2.getX()) {
       flipper.setInAnimation(mPage.getRawContext(), R.anim.push_right_in);
       flipper.setOutAnimation(mPage.getRawContext(), R.anim.push_right_out);
       flipper.showPrevious();
       flipper.setInAnimation(mPage.getRawContext(), R.anim.push_left_in);
       flipper.setOutAnimation(mPage.getRawContext(), R.anim.push_left_out);
       currentIndex -= 1;
       if (currentIndex == -1) {
         currentIndex = uris.size() - 1;
       }
     } else {
       return false;
     }
   } else {
     if (e1.getY() < e2.getY()) { // move to bottom
       System.out.println("onFling" + "1");
       flipper.showNext();
     } else if (e1.getY() > e2.getY()) {
       flipper.setInAnimation(mPage.getRawContext(), R.anim.push_bottom_in);
       flipper.setOutAnimation(mPage.getRawContext(), R.anim.push_bottom_out);
       flipper.showPrevious();
       flipper.setInAnimation(mPage.getRawContext(), R.anim.push_top_in);
       flipper.setOutAnimation(mPage.getRawContext(), R.anim.push_top_out);
     } else {
       return false;
     }
   }
   return true;
 }
Ejemplo n.º 15
0
  // begin do
  public void beginNavToRight() {
    if (false == mGrid.isFocused()) {
      return;
    }

    // setTitle
    String tempTitle = getString(R.string.facebook_recent_visit_page_title);
    setTitle(tempTitle);
    setPosition(false);
    flipper.setInAnimation(inFromRightAnimation());
    flipper.setOutAnimation(outToLeftAnimation());
    flipper.showNext();
  }
Ejemplo n.º 16
0
 /** 上个月 */
 public synchronized void lastMonth() {
   calendarContent.setInAnimation(push_right_in);
   calendarContent.setOutAnimation(push_right_out);
   calendar_day.add(Calendar.MONTH, -1); // 拨到上个月
   updateCurrent(); // 更新全局变量
   setCalendarDate(nextCalendar()); // 根据下个月填充数据
   calendarContent.showPrevious();
   //		// 回调
   //		if (onCalendarDateChangedListener != null) {
   //			onCalendarDateChangedListener.onCalendarDateChanged(calendarYear,
   //					calendarMonth + 1);
   //		}
 }
Ejemplo n.º 17
0
 private void showNextView() {
   vf_pic.setInAnimation(AnimationUtils.loadAnimation(ctx, R.anim.push_left_in));
   vf_pic.setOutAnimation(AnimationUtils.loadAnimation(ctx, R.anim.push_left_out));
   vf_pic.showNext();
   currentPage++;
   if (currentPage == vf_pic.getChildCount()) {
     dian_unselect(currentPage - 1);
     currentPage = 0;
     dian_select(currentPage);
   } else {
     dian_select(currentPage);
     dian_unselect(currentPage - 1);
   }
 }
 private void showNext() {
   if (mPosition < mNewsData.size() - 1) {
     // 设置下一屏动画
     mNewsBodyFlipper.setInAnimation(this, R.anim.push_left_in);
     mNewsBodyFlipper.setOutAnimation(this, R.anim.push_left_out);
     mPosition++;
     if (mPosition >= mNewsBodyFlipper.getChildCount()) {
       inflateView(mNewsBodyFlipper.getChildCount());
     }
     // 显示下一屏
     mNewsBodyFlipper.showNext();
   } else {
     Toast.makeText(this, R.string.no_next_news, Toast.LENGTH_SHORT).show();
   }
 }
Ejemplo n.º 19
0
 private void showPreviousView() {
   dian_select(currentPage);
   vf_pic.setInAnimation(AnimationUtils.loadAnimation(ctx, R.anim.push_right_in));
   vf_pic.setOutAnimation(AnimationUtils.loadAnimation(ctx, R.anim.push_right_out));
   vf_pic.showPrevious();
   currentPage--;
   if (currentPage == -1) {
     dian_unselect(currentPage + 1);
     currentPage = vf_pic.getChildCount() - 1;
     dian_select(currentPage);
   } else {
     dian_select(currentPage);
     dian_unselect(currentPage + 1);
   }
 }
Ejemplo n.º 20
0
	@Override
	public void onBackPressed() {
		if (mIndex == 0) {
			setResult(RESULT_CANCELED);
			finish();
		} else {
			if (FLITER.equals(mType)) {
				setResult(RESULT_CANCELED);
				finish();
			} else {
				mIndex = 0;
				initImageFactory();
				mVfFlipper.setInAnimation(ImageFactoryActivity.this,
						R.anim.push_right_in);
				mVfFlipper.setOutAnimation(ImageFactoryActivity.this,
						R.anim.push_right_out);
				mVfFlipper.showPrevious();
			}
		}
	}
 private void showPrevious() {
   if (mPosition > 0) {
     mPosition--;
     // 记录当前新闻编号
     HashMap<String, Object> hashMap = mNewsData.get(mPosition);
     mNid = (Integer) hashMap.get("nid");
     if (mCursor > mPosition) {
       mCursor = mPosition;
       inflateView(0);
       System.out.println(mNewsBodyFlipper.getChildCount());
       mNewsBodyFlipper.showNext(); // 显示下一页
     }
     mNewsBodyFlipper.setInAnimation(this, R.anim.push_right_in); // 定义下一页进来时的动画
     mNewsBodyFlipper.setOutAnimation(this, R.anim.push_right_out); // 定义当前页出去的动画
     mNewsBodyFlipper.showPrevious(); // 显示上一页
   } else {
     Toast.makeText(this, R.string.no_pre_news, Toast.LENGTH_SHORT).show();
   }
   System.out.println(mCursor + ";" + mPosition);
 }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.english_sliding_fragment, container, false);
    english_popular = (ViewFlipper) view.findViewById(R.id.movie_flipper_english_popular);
    english_rated = (ViewFlipper) view.findViewById(R.id.movie_flipper_english_rated);
    english_recent = (ViewFlipper) view.findViewById(R.id.movie_flipper_english_recent);

    if (!isBitmapCalculated) {
      calculateBitmap();
    }

    english_popular.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            startMovieListActivity("English Popular", CONSTANTS.ENGLISH_POPULAR);
          }
        });

    english_rated.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            startMovieListActivity("English Rated", CONSTANTS.ENGLISH_RATED);
          }
        });

    english_recent.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View view) {
            startMovieListActivity("English Recent", CONSTANTS.ENGLISH_RECENT);
          }
        });

    for (int i = 0; i < 5; i++) {
      ImageView imageView = new ImageView(getContext());
      imageView.setScaleType(ImageView.ScaleType.FIT_XY);
      imageView.setImageBitmap(popularBitmap[i]);
      english_popular.addView(imageView);
    }

    for (int i = 0; i < 5; i++) {
      ImageView imageView = new ImageView(getContext());
      imageView.setScaleType(ImageView.ScaleType.FIT_XY);
      imageView.setImageBitmap(ratedBitmap[i]);
      english_rated.addView(imageView);
    }

    for (int i = 0; i < 5; i++) {
      ImageView imageView = new ImageView(getContext());
      imageView.setScaleType(ImageView.ScaleType.FIT_XY);
      imageView.setImageBitmap(recentBitmap[i]);
      english_recent.addView(imageView);
    }

    english_popular.setInAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_in);
    english_popular.setOutAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_out);

    english_rated.setInAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_in);
    english_rated.setOutAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_out);

    english_recent.setInAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_in);
    english_recent.setOutAnimation(getContext(), android.support.v7.appcompat.R.anim.abc_fade_out);
    return view;
  }
Ejemplo n.º 23
0
 public static void setSlideToLeftAnimation(ViewFlipper flipper, Context context) {
   flipper.setInAnimation(AnimationUtils.loadAnimation(context, R.anim.slide_in_right));
   flipper.setOutAnimation(AnimationUtils.loadAnimation(context, R.anim.slide_out_left));
 }
Ejemplo n.º 24
0
 public static void setFadeAnimation(ViewFlipper flipper, Activity context) {
   flipper.setInAnimation(AnimationUtils.loadAnimation(context, android.R.anim.fade_in));
   flipper.setOutAnimation(AnimationUtils.loadAnimation(context, android.R.anim.fade_out));
 }
Ejemplo n.º 25
0
 private void flipRight() {
   viewFlipper.setInAnimation(lInAnim);
   viewFlipper.setOutAnimation(lOutAnim);
   viewFlipper.showNext();
   changeDisplay();
 }
Ejemplo n.º 26
0
 private void flipLeft() {
   viewFlipper.setInAnimation(rInAnim);
   viewFlipper.setOutAnimation(rOutAnim);
   viewFlipper.showPrevious();
   changeDisplay();
 }