本文整理汇总了C++中IView::PostOnAnimation方法的典型用法代码示例。如果您正苦于以下问题:C++ IView::PostOnAnimation方法的具体用法?C++ IView::PostOnAnimation怎么用?C++ IView::PostOnAnimation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IView
的用法示例。
在下文中一共展示了IView::PostOnAnimation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartSharedElementTransition
void EnterTransitionCoordinator::StartSharedElementTransition(
/* [in] */ IBundle* sharedElementState)
{
AutoPtr<IViewGroup> vg;
GetDecor((IViewGroup**)&vg);
IView* decorView = IView::Probe(vg);
if (decorView == NULL) {
return;
}
// Remove rejected shared elements
AutoPtr<IArrayList> rejectedNames;
CArrayList::New(ICollection::Probe(mAllSharedElementNames), (IArrayList**)&rejectedNames);
rejectedNames->RemoveAll(ICollection::Probe(mSharedElementNames));
AutoPtr<IArrayList> rejectedSnapshots = CreateSnapshots(
sharedElementState, ICollection::Probe(rejectedNames));
if (mListener != NULL) {
mListener->OnRejectSharedElements(IList::Probe(rejectedSnapshots));
}
StartRejectedAnimations(rejectedSnapshots);
// Now start shared element transition
AutoPtr<IArrayList> sharedElementSnapshots = CreateSnapshots(
sharedElementState, ICollection::Probe(mSharedElementNames));
ShowViews(mSharedElements, TRUE);
ScheduleSetSharedElementEnd(sharedElementSnapshots);
AutoPtr<IArrayList> originalImageViewState = SetSharedElementState(
sharedElementState, sharedElementSnapshots);
RequestLayoutForSharedElements();
Boolean startEnterTransition = AllowOverlappingTransitions() && !mIsReturning;
Boolean startSharedElementTransition = TRUE;
SetGhostVisibility(IView::INVISIBLE);
ScheduleGhostVisibilityChange(IView::INVISIBLE);
AutoPtr<ITransition> transition = BeginTransition(
vg, startEnterTransition, startSharedElementTransition);
ScheduleGhostVisibilityChange(IView::VISIBLE);
SetGhostVisibility(IView::VISIBLE);
if (startEnterTransition) {
StartEnterTransition(transition);
}
SetOriginalSharedElementState(mSharedElements, originalImageViewState);
if (mResultReceiver != NULL) {
// We can't trust that the view will disappear on the same frame that the shared
// element appears here. Assure that we get at least 2 frames for double-buffering.
AutoPtr<IRunnable> runnable = new OnAnimationRunnable(this);
decorView->PostOnAnimation(runnable);
}
}
示例2: if
ECode EnterTransitionCoordinator::OnAnimationRunnable::Run()
{
if (mAnimations++ < EnterTransitionCoordinator::MIN_ANIMATION_FRAMES) {
AutoPtr<IViewGroup> vg;
mHost->GetDecor((IViewGroup**)&vg);
IView* decorView = IView::Probe(vg);
if (decorView != NULL) {
decorView->PostOnAnimation(this);
}
}
else if (mHost->mResultReceiver != NULL) {
mHost->mResultReceiver->Send(
IActivityTransitionCoordinator::MSG_HIDE_SHARED_ELEMENTS, NULL);
mHost->mResultReceiver = NULL; // all done sending messages.
}
return NOERROR;
}