本文整理汇总了C++中IView::IsLayoutRequested方法的典型用法代码示例。如果您正苦于以下问题:C++ IView::IsLayoutRequested方法的具体用法?C++ IView::IsLayoutRequested怎么用?C++ IView::IsLayoutRequested使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IView
的用法示例。
在下文中一共展示了IView::IsLayoutRequested方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendSharedElementDestination
void EnterTransitionCoordinator::SendSharedElementDestination()
{
Boolean allReady, bval;
AutoPtr<IViewGroup> vg;
GetDecor((IViewGroup**)&vg);
IView* decorView = IView::Probe(vg);
AutoPtr<ITransition> evt;
GetEnterViewsTransition((ITransition**)&evt);
if (AllowOverlappingTransitions() && evt != NULL) {
allReady = FALSE;
}
else if (decorView == NULL) {
allReady = TRUE;
}
else {
decorView->IsLayoutRequested(&allReady);
allReady = !allReady;
if (allReady) {
Int32 size;
mSharedElements->GetSize(&size);
IView* view;
for (Int32 i = 0; i < size; i++) {
AutoPtr<IInterface> obj;
mSharedElements->Get(i, (IInterface**)&obj);
view = IView::Probe(obj);
view->IsLayoutRequested(&bval);
if (bval) {
allReady = FALSE;
break;
}
}
}
}
if (allReady) {
AutoPtr<IBundle> state = CaptureSharedElementState();
SetSharedElementMatrices();
MoveSharedElementsToOverlay();
mResultReceiver->Send(
IActivityTransitionCoordinator::MSG_SHARED_ELEMENT_DESTINATION, state);
}
else if (decorView != NULL) {
AutoPtr<IViewTreeObserver> vto;
decorView->GetViewTreeObserver((IViewTreeObserver**)&vto);
AutoPtr<IOnPreDrawListener> listener = new DestinationDecorViewOnPreDrawListener(this, decorView);
vto->AddOnPreDrawListener(listener);
}
if (AllowOverlappingTransitions()) {
StartEnterTransitionOnly();
}
}
示例2: TriggerViewsReady
ECode EnterTransitionCoordinator::TriggerViewsReady(
/* [in] */ IArrayMap* sharedElements) //ArrayMap<String, View>
{
if (mAreViewsReady) {
return NOERROR;
}
mAreViewsReady = TRUE;
// Ensure the views have been laid out before capturing the views -- we need the epicenter.
Boolean isEmpty;
sharedElements->IsEmpty(&isEmpty);
if (isEmpty) {
ViewsReady(sharedElements);
return NOERROR;
}
AutoPtr<IInterface> obj;
sharedElements->Get(0, (IInterface**)&obj);
IView* sharedElement = IView::Probe(obj);
Boolean requested;
sharedElement->IsLayoutRequested(&requested);
if (!requested) {
ViewsReady(sharedElements);
}
else {
AutoPtr<IOnPreDrawListener> listener = new SharedElementOnPreDrawListener(
this, sharedElements, sharedElement);
AutoPtr<IViewTreeObserver> vto;
sharedElement->GetViewTreeObserver((IViewTreeObserver**)&vto);
vto->AddOnPreDrawListener(listener);
}
return NOERROR;
}