本文整理汇总了C#中Android.Views.View.RequestLayout方法的典型用法代码示例。如果您正苦于以下问题:C# View.RequestLayout方法的具体用法?C# View.RequestLayout怎么用?C# View.RequestLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Views.View
的用法示例。
在下文中一共展示了View.RequestLayout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AnimateImageView
void AnimateImageView( View imageView, PointF startPos, PointF endPos, System.Drawing.SizeF startSize, System.Drawing.SizeF endSize, float duration, SimpleAnimator.AnimationComplete completeDelegate )
{
// calculate the deltas once before we start
float xDelta = endPos.X - startPos.X;
float yDelta = endPos.Y - startPos.Y;
float deltaWidth = endSize.Width - startSize.Width;
float deltaHeight = endSize.Height - startSize.Height;
// create an animator
SimpleAnimator_Float imageAnimator = new SimpleAnimator_Float( 0.00f, 1.00f, duration,
delegate( float percent, object value )
{
Rock.Mobile.Threading.Util.PerformOnUIThread( delegate
{
// each update, interpolate the deltas and apply
imageView.SetX( startPos.X + ( xDelta * percent ) );
imageView.SetY( startPos.Y + ( yDelta * percent ) );
imageView.LayoutParameters.Width = (int)( startSize.Width + ( deltaWidth * percent ) );
imageView.LayoutParameters.Height = (int)( startSize.Height + ( deltaHeight * percent ) );
// force the image to re-evaluate its size
imageView.RequestLayout( );
} );
},
//ANIMATION COMPLETE
delegate
{
if ( completeDelegate != null )
{
Rock.Mobile.Threading.Util.PerformOnUIThread( delegate
{
completeDelegate( );
} );
}
} );
imageAnimator.Start( );
}