@Override public void run() { Log.d(TAG, "runnableActualizarPantalla()"); flip.showNext(); sonidoCosas.play(sonidoCosasID[contadorPalabras], 1, 1, 1, 0, 1); nHandler.postDelayed(nextPantalla, 1500); }
/** 向左滑动 */ protected void moveColLeft() { if (viewFlipper.getDisplayedChild() == 0) { viewFlipper.setInAnimation(leftIn); viewFlipper.setOutAnimation(leftOut); viewFlipper.showNext(); preView.setImageResource(R.drawable.page_arrow_01); } }
/** * 移动到下一个月 * * @param gvFlag */ private void enterNextMonth(int gvFlag, ViewFlipper flipper, View view) { jumpMonth++; gvFlag++; addGridView(flipper, view, gvFlag); flipper.setInAnimation( AnimationUtils.loadAnimation(context, R.anim.fragment_slide_right_enter)); flipper.setOutAnimation(AnimationUtils.loadAnimation(context, R.anim.fragment_slide_left_exit)); flipper.showNext(); flipper.removeViewAt(0); }
public void next(View view) { if (index < mViewFlipper.getChildCount()) { mViewFlipper.setInAnimation(customAnimation.inFromRightAnimation()); mViewFlipper.setOutAnimation(customAnimation.outToLeftAnimation()); mViewFlipper.showNext(); index++; ToggleRadioButton(); } }
private void flip() { if (firstIsShown) { firstIsShown = false; container2.removeAllViews(); container2.addView(secondView); } else { firstIsShown = true; container1.removeAllViews(); container1.addView(firstView); } flipper.showNext(); }
void showDisambig() { if (flipper.getCurrentView() != flipper.getChildAt(0)) { flipper.setInAnimation(getContext(), R.anim.slide_in_left); flipper.setOutAnimation(getContext(), R.anim.slide_out_right); flipper.showNext(); } disambigHeading.setTypeface(null, Typeface.BOLD); disambigHeading.setEnabled(false); issuesHeading.setTypeface(null, Typeface.NORMAL); issuesHeading.setEnabled(true); }
/** 下个月 */ public synchronized void nextMonth() { calendarContent.setInAnimation(push_left_in); calendarContent.setOutAnimation(push_left_out); calendar_day.add(Calendar.MONTH, 1); // 拨到下个月 updateCurrent(); // 更新全局变量 setCalendarDate(nextCalendar()); // 根据下个月填充数据 calendarContent.showNext(); // // 回调 // if (onCalendarDateChangedListener != null) { // onCalendarDateChangedListener.onCalendarDateChanged(calendarYear, // calendarMonth + 1); // } }
// 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(); }
@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; }
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); } }
@Override public void doContentAction( GridTabActivity context, Animation animation, ViewFlipper viewFlipper) { intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); View view = context.getLocalActivityManager().startActivity("", intent).getDecorView(); // 切换activity时显示的动画效果 if (this.animation != null) { view.startAnimation(this.animation); } else if (animation != null) { view.startAnimation(animation); } viewFlipper.removeAllViews(); viewFlipper.addView(view); viewFlipper.showNext(); }
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(); } }
@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; } }
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); }
public void onClick(View v) { flippy.showNext(); }
@Override public void onClick(View arg0) { // TODO Auto-generated method stub flippy.showNext(); }
private void flipRight() { viewFlipper.setInAnimation(lInAnim); viewFlipper.setOutAnimation(lOutAnim); viewFlipper.showNext(); changeDisplay(); }