android.view.View.cancelLongPress()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(229)

本文整理了Java中android.view.View.cancelLongPress()方法的一些代码示例,展示了View.cancelLongPress()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.cancelLongPress()方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:cancelLongPress

View.cancelLongPress介绍

暂无

代码示例

代码示例来源:origin: GeoODK/collect

@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
    float distanceY) {
  // The onFling() captures the 'up' event so our view thinks it gets long
  // pressed.
  // We don't wnat that, so cancel it.
  if (mCurrentView != null) {
    mCurrentView.cancelLongPress();
  }
  return false;
}

代码示例来源:origin: fookwood/Launcher3

protected void cancelCurrentPageLongPress() {
  // Try canceling the long press. It could also have been scheduled
  // by a distant descendant, so use the mAllowLongPress flag to block
  // everything
  final View currentPage = getPageAt(mCurrentPage);
  if (currentPage != null) {
    currentPage.cancelLongPress();
  }
}

代码示例来源:origin: enricocid/LaunchEnr

protected void cancelCurrentPageLongPress() {
  // Try canceling the long press. It could also have been scheduled
  // by a distant descendant, so use the mAllowLongPress flag to block
  // everything
  final View currentPage = getPageAt(mCurrentPage);
  if (currentPage != null) {
    currentPage.cancelLongPress();
  }
}

代码示例来源:origin: klinker24/Android-Blur-Launcher

protected void cancelCurrentPageLongPress() {
  // Try canceling the long press. It could also have been scheduled
  // by a distant descendant, so use the mAllowLongPress flag to block
  // everything
  final View currentPage = getPageAt(mCurrentPage);
  if (currentPage != null) {
    currentPage.cancelLongPress();
  }
}

代码示例来源:origin: klinker24/launcher3

protected void cancelCurrentPageLongPress() {
  // Try canceling the long press. It could also have been scheduled
  // by a distant descendant, so use the mAllowLongPress flag to block
  // everything
  final View currentPage = getPageAt(mCurrentPage);
  if (currentPage != null) {
    currentPage.cancelLongPress();
  }
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

protected void cancelCurrentPageLongPress() {
  if (mAllowLongPress) {
    //mAllowLongPress = false;
    // Try canceling the long press. It could also have been scheduled
    // by a distant descendant, so use the mAllowLongPress flag to block
    // everything
    final View currentPage = getPageAt(mCurrentPage);
    if (currentPage != null) {
      currentPage.cancelLongPress();
    }
  }
}

代码示例来源:origin: fookwood/Launcher3

/**
 * {@inheritDoc}
 */
@Override
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
  if (disallowIntercept) {
    // We need to make sure to cancel our long press if
    // a scrollable widget takes over touch events
    final View currentPage = getPageAt(mCurrentPage);
    currentPage.cancelLongPress();
  }
  super.requestDisallowInterceptTouchEvent(disallowIntercept);
}

代码示例来源:origin: enricocid/LaunchEnr

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: fookwood/Launcher3

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: fookwood/Launcher3

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: klinker24/Android-Blur-Launcher

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: klinker24/Android-Blur-Launcher

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: klinker24/launcher3

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: enricocid/LaunchEnr

@Override
  public void cancelLongPress() {
    super.cancelLongPress();

    // Cancel long press for all children
    final int count = getChildCount();
    for (int i = 0; i < count; i++) {
      final View child = getChildAt(i);
      child.cancelLongPress();
    }
  }
}

代码示例来源:origin: klinker24/launcher3

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: WeAreFairphone/FP2-Launcher

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  // Cancel long press for all children
  final int count = getChildCount();
  for (int i = 0; i < count; i++) {
    final View child = getChildAt(i);
    child.cancelLongPress();
  }
}

代码示例来源:origin: GeoODK/collect

@Override
public void cancelLongPress() {
  super.cancelLongPress();
  mButtons.cancelLongPress();
  for (int i = 0; i < mButtons.getChildCount(); i++) {
    mButtons.getChildAt(i).cancelLongPress();
  }
}

相关文章

微信公众号

最新文章

更多

View类方法