當前位置: 首頁>>代碼示例>>Java>>正文


Java ViewFlipper.setOutAnimation方法代碼示例

本文整理匯總了Java中android.widget.ViewFlipper.setOutAnimation方法的典型用法代碼示例。如果您正苦於以下問題:Java ViewFlipper.setOutAnimation方法的具體用法?Java ViewFlipper.setOutAnimation怎麽用?Java ViewFlipper.setOutAnimation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.widget.ViewFlipper的用法示例。


在下文中一共展示了ViewFlipper.setOutAnimation方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreate

import android.widget.ViewFlipper; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.welcome_activity);
    setupActivity();

    viewFlipper = (ViewFlipper) findViewById(R.id.viewFlipper);
    viewFlipper.setInAnimation(this, R.anim.slide_in_left);
    viewFlipper.setOutAnimation(this, R.anim.slide_out_right);

    mNextStepButton = (Button) findViewById(R.id.next_step_button);
    mNextStepButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            goToStep(mNextStep);
        }
    });
    mLoading = (LinearLayout) findViewById(R.id.loading);

    goToStep(STEP_WELCOME);
}
 
開發者ID:victordiaz,項目名稱:phonk,代碼行數:23,代碼來源:WelcomeActivity.java

示例2: prevView

import android.widget.ViewFlipper; //導入方法依賴的package包/類
@Override
public void prevView(ViewFlipper taskViewFlipper, TextView prevImgBtn, TextView nextImgBtn) {
    taskViewFlipper.setInAnimation(mContext, R.anim.left_in);
    taskViewFlipper.setOutAnimation(mContext, R.anim.left_out);
    if (taskViewFlipper.getDisplayedChild() != 0) {
        //上一張圖
        taskViewFlipper.showPrevious();
        if (taskViewFlipper.getDisplayedChild() == 0) {
            prevImgBtn.setText(R.string.str_no);
            nextImgBtn.setText(R.string.str_next_ques);
        } else {
            prevImgBtn.setText(R.string.str_previous_ques);
            nextImgBtn.setText(R.string.str_next_ques);
        }
    } else {
        prevImgBtn.setText(R.string.str_no);
        nextImgBtn.setText(R.string.str_next_ques);
    }
}
 
開發者ID:codekongs,項目名稱:ImageClassify,代碼行數:20,代碼來源:TagImagePresenter.java

示例3: nextView

import android.widget.ViewFlipper; //導入方法依賴的package包/類
@Override
public void nextView(ViewFlipper taskViewFlipper, TextView prevImgBtn, TextView nextImgBtn) {
    taskViewFlipper.setInAnimation(mContext, R.anim.right_in);
    taskViewFlipper.setOutAnimation(mContext, R.anim.right_out);
    if (taskViewFlipper.getDisplayedChild() != mTaskAmount) {
        taskViewFlipper.showNext();
        if (taskViewFlipper.getDisplayedChild() == mTaskAmount) {
            //最後一頁結果頁
            updateTagResult(taskViewFlipper, mTagResultGridView, mFinishProgressTv, getFinishedAmount());
        } else {
            prevImgBtn.setText(R.string.str_previous_ques);
            nextImgBtn.setText(R.string.str_next_ques);
        }
    } else {
        Log.d(TAG, "nextView: 結果頁 " + getFinishedAmount());
        //最後一頁結果頁
        updateTagResult(taskViewFlipper, mTagResultGridView, mFinishProgressTv, getFinishedAmount());
    }
}
 
開發者ID:codekongs,項目名稱:ImageClassify,代碼行數:20,代碼來源:TagImagePresenter.java

示例4: onCreateView

import android.widget.ViewFlipper; //導入方法依賴的package包/類
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
       View view =inflater.inflate(R.layout.fragment_home, container, false);
        viewFlipper = (ViewFlipper) view.findViewById(R.id.flipper);
        fade_in = AnimationUtils.loadAnimation(getContext(),
                android.R.anim.fade_in);
        fade_out = AnimationUtils.loadAnimation(getContext(),
                android.R.anim.fade_out);
        viewFlipper.setInAnimation(fade_in);
        viewFlipper.setOutAnimation(fade_out);
//sets auto flipping
        viewFlipper.setAutoStart(true);
        viewFlipper.setFlipInterval(3000);
        viewFlipper.startFlipping();
        return view;
    }
 
開發者ID:IOSD,項目名稱:YFHR_Android_App,代碼行數:19,代碼來源:HomeFragment.java

示例5: flipToChild

import android.widget.ViewFlipper; //導入方法依賴的package包/類
public static void flipToChild(Activity activity,int flipperID,int child,boolean animate) {
	ViewFlipper flipper=(ViewFlipper)activity.findViewById(flipperID);
	Animation in=null;
	Animation out=null;
	if (!animate) {
		in=flipper.getInAnimation();
		out=flipper.getOutAnimation();
		flipper.setInAnimation(null);
		flipper.setOutAnimation(null);
	}
	flipper.getChildAt(child).setVisibility(View.VISIBLE);
	flipper.setDisplayedChild(child);
	if (!animate) {
		flipper.setInAnimation(in);
		flipper.setOutAnimation(out);
	}
}
 
開發者ID:Coding-Sunday-Sofia,項目名稱:TapsOfFire,代碼行數:18,代碼來源:UIHelpers.java

示例6: onCreate

import android.widget.ViewFlipper; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_restore);

    mFlipper =  (ViewFlipper) findViewById(R.id.restore_flipper);
    mRestoreButton = findViewById(R.id.restore_button);
    mRestoreProgress = findViewById(R.id.restore_progress);
    mPasswordInput = (EditText) findViewById(R.id.input_password);

    // Setup flipper animations
    Animation animationFlipIn  = AnimationUtils.loadAnimation(this, R.anim.flipin);
    Animation animationFlipOut = AnimationUtils.loadAnimation(this, R.anim.flipout);

    mFlipper.setInAnimation(animationFlipIn);
    mFlipper.setOutAnimation(animationFlipOut);

    setupMessages();
    setupCheckCallbackup();
}
 
開發者ID:vishesh,項目名稱:sealnote,代碼行數:21,代碼來源:RestoreActivity.java

示例7: initComponent

import android.widget.ViewFlipper; //導入方法依賴的package包/類
/**
 * �������� : initComponent �������� : ����������ֵ˵����
 *
 * 
 */
private void initComponent() {

	mViewFilpper = (ViewFlipper) findViewById(R.id.view_flipper);

	// ��̬����ķ�ʽΪViewFlipper������view
	for (int i = 0; i < mFlipperArray.length; i++) {
		mViewFilpper.addView(getView(mFlipperArray[i]));
	}

	// ���ö���Ч��
	mViewFilpper.setInAnimation(this, R.anim.right_in);
	mViewFilpper.setOutAnimation(this, R.anim.right_out);

	// �趨ViewFlipper��ͼ�л�ʱ����
	mViewFilpper.setFlipInterval(4000);

	// ����ViewFlipper����ʼ����
	mViewFilpper.setAutoStart(true);

	if (mViewFilpper.isAutoStart() && !mViewFilpper.isFlipping()) {
		mViewFilpper.startFlipping();
	}

}
 
開發者ID:snsdTJ,項目名稱:order_dish,代碼行數:30,代碼來源:MainActivity.java

示例8: goPrev

import android.widget.ViewFlipper; //導入方法依賴的package包/類
/**
 * Handler for "previous month" button in main view
 */
@SuppressWarnings({"UnusedParameters", "SameParameterValue"})
public void goPrev(View v) {
    // Update calendar
    monthCurrent--;
    if (monthCurrent < 1) {
        monthCurrent = 12;
        yearCurrent--;
    }

    if (viewCurrent == R.id.calendar) {
        viewCurrent = R.id.calendar_2;
    } else {
        viewCurrent = R.id.calendar;
    }

    calendarUpdate();

    // Show slide animation from left to right
    ViewFlipper flipper = (ViewFlipper) findViewById(R.id.mainwidget);
    flipper.setInAnimation(AnimationHelper.inFromLeftAnimation());
    flipper.setOutAnimation(AnimationHelper.outToRightAnimation());
    flipper.showNext();
}
 
開發者ID:arnowelzel,項目名稱:periodical,代碼行數:27,代碼來源:MainActivity.java

示例9: goNext

import android.widget.ViewFlipper; //導入方法依賴的package包/類
/**
 * Handler for "next month" button in main view
 */
@SuppressWarnings({"UnusedParameters", "SameParameterValue"})
public void goNext(View v) {
    // Update calendar
    monthCurrent++;
    if (monthCurrent > 12) {
        monthCurrent = 1;
        yearCurrent++;
    }

    if (viewCurrent == R.id.calendar) {
        viewCurrent = R.id.calendar_2;
    } else {
        viewCurrent = R.id.calendar;
    }

    calendarUpdate();

    // Show slide animation from right to left
    ViewFlipper flipper = (ViewFlipper) findViewById(R.id.mainwidget);
    flipper.setInAnimation(AnimationHelper.inFromRightAnimation());
    flipper.setOutAnimation(AnimationHelper.outToLeftAnimation());
    flipper.showPrevious();
}
 
開發者ID:arnowelzel,項目名稱:periodical,代碼行數:27,代碼來源:MainActivity.java

示例10: onActivityCreated

import android.widget.ViewFlipper; //導入方法依賴的package包/類
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    this.mStickerView = activity.mStickerView;
    flipper = (ViewFlipper) mainView.findViewById(R.id.flipper);
    flipper.setInAnimation(activity, R.anim.in_bottom_to_top);
    flipper.setOutAnimation(activity, R.anim.out_bottom_to_top);

    //
    backToMenu = mainView.findViewById(R.id.back_to_main);
    typeList = (RecyclerView) mainView
            .findViewById(R.id.stickers_type_list);
    typeList.setHasFixedSize(true);
    LinearLayoutManager mLayoutManager = new LinearLayoutManager(activity);
    mLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
    typeList.setLayoutManager(mLayoutManager);
    typeList.setAdapter(new StickerTypeAdapter(this));
    backToType = mainView.findViewById(R.id.back_to_type);// back按鈕

    stickerList = (RecyclerView) mainView.findViewById(R.id.stickers_list);
    // stickerList.setHasFixedSize(true);
    LinearLayoutManager stickerListLayoutManager = new LinearLayoutManager(
            activity);
    stickerListLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
    stickerList.setLayoutManager(stickerListLayoutManager);
    mStickerAdapter = new StickerAdapter(this);
    stickerList.setAdapter(mStickerAdapter);

    backToMenu.setOnClickListener(new BackToMenuClick());// 返回主菜單
    backToType.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {// 返回上一級列表
            flipper.showPrevious();
        }
    });
}
 
開發者ID:viseator,項目名稱:MontageCam,代碼行數:37,代碼來源:StickerFragment.java

示例11: onCreateView

import android.widget.ViewFlipper; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    mainView = inflater.inflate(R.layout.fragment_edit_image_sticker_type,
            null);
    this.mStickerView = activity.mStickerView;
    flipper = (ViewFlipper) mainView.findViewById(R.id.flipper);
    flipper.setInAnimation(activity, R.anim.in_bottom_to_top);
    flipper.setOutAnimation(activity, R.anim.out_bottom_to_top);

    //
    backToMenu = mainView.findViewById(R.id.back_to_main);
    typeList = (RecyclerView) mainView
            .findViewById(R.id.stickers_type_list);
    typeList.setHasFixedSize(true);
    LinearLayoutManager mLayoutManager = new LinearLayoutManager(activity);
    mLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
    typeList.setLayoutManager(mLayoutManager);
    typeList.setAdapter(new StickerTypeAdapter(this));
    backToType = mainView.findViewById(R.id.back_to_type);// back按鈕

    stickerList = (RecyclerView) mainView.findViewById(R.id.stickers_list);
    // stickerList.setHasFixedSize(true);
    LinearLayoutManager stickerListLayoutManager = new LinearLayoutManager(
            activity);
    stickerListLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
    stickerList.setLayoutManager(stickerListLayoutManager);
    mStickerAdapter = new StickerAdapter(this);
    stickerList.setAdapter(mStickerAdapter);

    //loadStickersData();

    return mainView;
}
 
開發者ID:ImKarl,項目名稱:PictureBeautify,代碼行數:35,代碼來源:StirckerFragment.java

示例12: a

import android.widget.ViewFlipper; //導入方法依賴的package包/類
public static void a(ViewFlipper paramViewFlipper)
{
  TranslateAnimation localTranslateAnimation1 = new TranslateAnimation(2, 0.0F, 2, -1.0F, 2, 0.0F, 2, 0.0F);
  localTranslateAnimation1.setDuration(1000L);
  localTranslateAnimation1.setInterpolator(new DecelerateInterpolator());
  paramViewFlipper.setOutAnimation(localTranslateAnimation1);
  TranslateAnimation localTranslateAnimation2 = new TranslateAnimation(2, 1.0F, 2, 0.0F, 2, 0.0F, 2, 0.0F);
  localTranslateAnimation2.setDuration(1000L);
  localTranslateAnimation2.setInterpolator(new DecelerateInterpolator());
  paramViewFlipper.setInAnimation(localTranslateAnimation2);
  paramViewFlipper.showNext();
}
 
開發者ID:ChiangC,項目名稱:FMTech,代碼行數:13,代碼來源:efj.java

示例13: onCreateView

import android.widget.ViewFlipper; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    rootView = inflater.inflate(R.layout.fragment_schedule, null);
    context = getActivity();

    mScheduleGrid = (StickyGridHeadersGridView) rootView.findViewById(R.id.schedule_grid);
    mViewFlipper = (ViewFlipper) rootView.findViewById(R.id.schedule_view_flipper);
    mViewFlipper.setInAnimation(context, R.anim.abc_fade_in);
    mViewFlipper.setOutAnimation(context, R.anim.abc_fade_out);

    new LoadTask().execute();

    return rootView;
}
 
開發者ID:xiprox,項目名稱:HorribleSubs-Schedule,代碼行數:15,代碼來源:ScheduleFragment.java

示例14: onCreateView

import android.widget.ViewFlipper; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    rootView = inflater.inflate(R.layout.card_recent_unlocks, null);

    mCardTitle = (TextView) rootView.findViewById(R.id.card_recent_unlocks_title);
    mRecentUnlocksList = (ListView) rootView.findViewById(R.id.card_recent_unlocks_list);

    mMoreItemsButton = (RelativeLayout) rootView.findViewById(R.id.card_recent_unlocks_more_button);

    mViewFlipper = (ViewFlipper) rootView.findViewById(R.id.card_recent_unlocks_view_flipper);
    mViewFlipper.setInAnimation(getActivity(), R.anim.abc_fade_in);
    mViewFlipper.setOutAnimation(getActivity(), R.anim.abc_fade_out);

    mMessageViewFlipper = (ViewFlipper) rootView.findViewById(R.id.card_recent_unlocks_connection_view_flipper);
    mMessageViewFlipper.setInAnimation(getActivity(), R.anim.abc_fade_in);
    mMessageViewFlipper.setOutAnimation(getActivity(), R.anim.abc_fade_out);

    mRecentUnlocksList.setOnItemClickListener(new recentUnlocksListItemClickListener());

    mCard = (LinearLayout) rootView.findViewById(R.id.card_recent_unlocks_card);

    mMessageIcon = (ImageView) rootView.findViewById(R.id.card_recent_unlocks_message_icon);
    mMessageTitle = (TextView) rootView.findViewById(R.id.card_recent_unlocks_message_title);
    mMessageSummary = (TextView) rootView.findViewById(R.id.card_recent_unlocks_message_summary);

    mMoreItemsButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            startActivity(new Intent(mContext, RecentUnlocksActivity.class));
        }
    });

    return rootView;
}
 
開發者ID:xiprox,項目名稱:WaniKani-for-Android,代碼行數:36,代碼來源:RecentUnlocksCard.java

示例15: onCreateView

import android.widget.ViewFlipper; //導入方法依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    rootView = inflater.inflate(R.layout.card_critical_items, null);

    mCardTitle = (TextView) rootView.findViewById(R.id.card_critical_items_title);
    mCriticalItemsList = (ListView) rootView.findViewById(R.id.card_critical_items_list);

    mViewFlipper = (ViewFlipper) rootView.findViewById(R.id.card_critical_items_view_flipper);
    mViewFlipper.setInAnimation(getActivity(), R.anim.abc_fade_in);
    mViewFlipper.setOutAnimation(getActivity(), R.anim.abc_fade_out);

    mMessageViewFlipper = (ViewFlipper) rootView.findViewById(R.id.card_critical_items_connection_view_flipper);
    mMessageViewFlipper.setInAnimation(getActivity(), R.anim.abc_fade_in);
    mMessageViewFlipper.setOutAnimation(getActivity(), R.anim.abc_fade_out);

    mCard = (LinearLayout) rootView.findViewById(R.id.card_critical_items_card);

    mMessageIcon = (ImageView) rootView.findViewById(R.id.card_critical_items_message_icon);
    mMessageTitle = (TextView) rootView.findViewById(R.id.card_critical_items_message_title);
    mMessageSummary = (TextView) rootView.findViewById(R.id.card_critical_items_message_summary);

    mCriticalItemsList.setOnItemClickListener(new criticalItemListItemClickListener());

    mMoreButton = (RelativeLayout) rootView.findViewById(R.id.card_critical_items_more_button);
    mMoreButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            startActivity(new Intent(getActivity(), CriticalItemsActivity.class));
        }
    });

    return rootView;
}
 
開發者ID:xiprox,項目名稱:WaniKani-for-Android,代碼行數:35,代碼來源:CriticalItemsCard.java


注:本文中的android.widget.ViewFlipper.setOutAnimation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。