本文整理汇总了C#中android.isCanceled方法的典型用法代码示例。如果您正苦于以下问题:C# android.isCanceled方法的具体用法?C# android.isCanceled怎么用?C# android.isCanceled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android
的用法示例。
在下文中一共展示了android.isCanceled方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onKeyUp
public virtual bool onKeyUp(int keyCode, android.view.KeyEvent @event)
{
if (getApplicationInfo().targetSdkVersion >= android.os.Build.VERSION_CODES.ECLAIR)
{
if (keyCode == android.view.KeyEvent.KEYCODE_BACK && @event.isTracking() && [email protected]
.isCanceled())
{
onBackPressed();
return true;
}
}
return false;
}
示例2: onKey
public virtual bool onKey(android.content.DialogInterface dialog, int keyCode, android.view.KeyEvent
@event)
{
if (keyCode == android.view.KeyEvent.KEYCODE_MENU || keyCode == android.view.KeyEvent
.KEYCODE_BACK)
{
if (@event.getAction() == android.view.KeyEvent.ACTION_DOWN && @event.getRepeatCount
() == 0)
{
android.view.Window win = mDialog.getWindow();
if (win != null)
{
android.view.View decor = win.getDecorView();
if (decor != null)
{
android.view.KeyEvent.DispatcherState ds = decor.getKeyDispatcherState();
if (ds != null)
{
ds.startTracking(@event, this);
return true;
}
}
}
}
else
{
if (@event.getAction() == android.view.KeyEvent.ACTION_UP && [email protected]())
{
android.view.Window win = mDialog.getWindow();
if (win != null)
{
android.view.View decor = win.getDecorView();
if (decor != null)
{
android.view.KeyEvent.DispatcherState ds = decor.getKeyDispatcherState();
if (ds != null && ds.isTracking(@event))
{
mMenu.close(true);
dialog.dismiss();
return true;
}
}
}
}
}
}
// Menu shortcut matching
return mMenu.performShortcut(keyCode, @event, 0);
}
示例3: dispatchKeyEvent
public override bool dispatchKeyEvent(android.view.KeyEvent @event)
{
if (@event.getKeyCode() == android.view.KeyEvent.KEYCODE_BACK)
{
if (this.getKeyDispatcherState() == null)
{
return base.dispatchKeyEvent(@event);
}
if (@event.getAction() == android.view.KeyEvent.ACTION_DOWN && @event.getRepeatCount
() == 0)
{
android.view.KeyEvent.DispatcherState state = this.getKeyDispatcherState();
if (state != null)
{
state.startTracking(@event, this);
}
return true;
}
else
{
if (@event.getAction() == android.view.KeyEvent.ACTION_UP)
{
android.view.KeyEvent.DispatcherState state = this.getKeyDispatcherState();
if (state != null && state.isTracking(@event) && [email protected]())
{
this._enclosing.dismiss();
return true;
}
}
}
return base.dispatchKeyEvent(@event);
}
else
{
return base.dispatchKeyEvent(@event);
}
}
示例4: onKeyPreIme
/// <summary>Filter pre-IME key events.</summary>
/// <remarks>
/// Filter pre-IME key events. By forwarding
/// <see cref="android.view.View.onKeyPreIme(int, android.view.KeyEvent)">android.view.View.onKeyPreIme(int, android.view.KeyEvent)
/// </see>
/// events to this function, views using ListPopupWindow can have it dismiss the popup
/// when the back key is pressed.
/// </remarks>
/// <param name="keyCode">keyCode param passed to the host view's onKeyPreIme</param>
/// <param name="event">event param passed to the host view's onKeyPreIme</param>
/// <returns>true if the event was handled, false if it was ignored.</returns>
/// <seealso cref="setModal(bool)">setModal(bool)</seealso>
public virtual bool onKeyPreIme(int keyCode, android.view.KeyEvent @event)
{
if (keyCode == android.view.KeyEvent.KEYCODE_BACK && isShowing())
{
// special case for the back key, we do not even try to send it
// to the drop down list but instead, consume it immediately
android.view.View anchorView = mDropDownAnchorView;
if (@event.getAction() == android.view.KeyEvent.ACTION_DOWN && @event.getRepeatCount
() == 0)
{
android.view.KeyEvent.DispatcherState state = anchorView.getKeyDispatcherState();
if (state != null)
{
state.startTracking(@event, this);
}
return true;
}
else
{
if (@event.getAction() == android.view.KeyEvent.ACTION_UP)
{
android.view.KeyEvent.DispatcherState state = anchorView.getKeyDispatcherState();
if (state != null)
{
state.handleUpEvent(@event);
}
if (@event.isTracking() && [email protected]())
{
dismiss();
return true;
}
}
}
}
return false;
}
示例5: onKeyPreIme
public override bool onKeyPreIme(int keyCode, android.view.KeyEvent @event)
{
if (keyCode == android.view.KeyEvent.KEYCODE_BACK)
{
// special case for the back key, we do not even try to send it
// to the drop down list but instead, consume it immediately
if (@event.getAction() == android.view.KeyEvent.ACTION_DOWN && @event.getRepeatCount
() == 0)
{
android.view.KeyEvent.DispatcherState state = getKeyDispatcherState();
if (state != null)
{
state.startTracking(@event, this);
}
return true;
}
else
{
if (@event.getAction() == android.view.KeyEvent.ACTION_UP)
{
android.view.KeyEvent.DispatcherState state = getKeyDispatcherState();
if (state != null)
{
state.handleUpEvent(@event);
}
if (@event.isTracking() && [email protected]())
{
mSearchView.clearFocus();
mSearchView.setImeVisibility(false);
return true;
}
}
}
}
return base.onKeyPreIme(keyCode, @event);
}
示例6: onContainerKey
private bool onContainerKey(android.view.KeyEvent @event)
{
int keyCode = @event.getKeyCode();
if (isInterestingKey(keyCode))
{
if (keyCode == android.view.KeyEvent.KEYCODE_BACK)
{
if (@event.getAction() == android.view.KeyEvent.ACTION_DOWN && @event.getRepeatCount
() == 0)
{
if (mOwnerView != null)
{
android.view.KeyEvent.DispatcherState ds = mOwnerView.getKeyDispatcherState();
if (ds != null)
{
ds.startTracking(@event, this);
}
}
return true;
}
else
{
if (@event.getAction() == android.view.KeyEvent.ACTION_UP && @event.isTracking()
&& [email protected]())
{
setVisible(false);
return true;
}
}
}
else
{
dismissControlsDelayed(ZOOM_CONTROLS_TIMEOUT);
}
// Let the container handle the key
return false;
}
else
{
android.view.ViewRootImpl viewRoot = getOwnerViewRootImpl();
if (viewRoot != null)
{
viewRoot.dispatchKey(@event);
}
// We gave the key to the owner, don't let the container handle this key
return true;
}
}