本文整理汇总了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);
}
示例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);
}
}
示例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());
}
}
示例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;
}
示例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);
}
}
示例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();
}
示例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();
}
}
示例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();
}
示例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();
}
示例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();
}
});
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}