本文整理汇总了C#中Android.Views.View.Post方法的典型用法代码示例。如果您正苦于以下问题:C# View.Post方法的具体用法?C# View.Post怎么用?C# View.Post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Views.View
的用法示例。
在下文中一共展示了View.Post方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnTouch
public bool OnTouch(View v, MotionEvent ev)
{
bool handled = false;
if (mZoomEnabled && HasDrawable((ImageView) v)) {
IViewParent parent = v.Parent;
switch (ev.Action) {
case MotionEventActions.Down:
// First, disable the Parent from intercepting the touch
// event
if (null != parent)
parent.RequestDisallowInterceptTouchEvent(true);
else
Log.Info(LOG_TAG, "onTouch getParent() returned null");
// If we're flinging, and the user presses down, cancel
// fling
CancelFling();
break;
case MotionEventActions.Cancel:
case MotionEventActions.Up:
// If the user has zoomed less than min scale, zoom back
// to min scale
if (GetScale() < mMinScale) {
RectF rect = GetDisplayRect();
if (null != rect) {
v.Post(new AnimatedZoomRunnable(this,GetScale(), mMinScale,
rect.CenterX(), rect.CenterY()));
handled = true;
}
}
break;
}
// Try the Scale/Drag detector
if (null != mScaleDragDetector
&& mScaleDragDetector.OnTouchEvent(ev)) {
handled = true;
}
// Check to see if the user double tapped
if (null != mGestureDetector && mGestureDetector.OnTouchEvent(ev)) {
handled = true;
}
}
return handled;
}
示例2: SetShowcaseView
public void SetShowcaseView(View view)
{
if (isRedundant || view == null)
{
isRedundant = true;
return;
}
isRedundant = false;
view.Post(() =>
{
Point viewPoint = Calculator.GetShowcasePointFromView(view, ConfigurationOptions);
SetShowcasePosition(viewPoint);
Invalidate();
});
}