android.widget.ImageView.onKeyDown()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(140)

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

ImageView.onKeyDown介绍

暂无

代码示例

代码示例来源:origin: jdamcd/android-crop

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
    event.startTracking();
    return true;
  }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: multidots/android-app-common-tasks

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK && getScale() > 1.0f) {
    // If we're zoomed in, pressing Back jumps out to show the entire
    // image, otherwise Back returns the user to the gallery.
    zoomTo(1.0f);
    return true;
  }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: multidots/android-app-common-tasks

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK && getScale() > 1.0f) {
    // If we're zoomed in, pressing Back jumps out to show the entire
    // image, otherwise Back returns the user to the gallery.
    zoomTo(1.0f);
    return true;
  }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: google/ringdroid

@Override
  public boolean onKeyUp(int keyCode, KeyEvent event) {
    mVelocity = 0;
    if (mListener != null)
      mListener.markerKeyUp();
    return super.onKeyDown(keyCode, event);
  }
}

代码示例来源:origin: Ronak-LM/memoir

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK && getScale() > 1.0f) {
    // If we're zoomed in, pressing Back jumps out to show the entire
    // image, otherwise Back returns the user to the gallery.
    zoomTo(1.0f);
    return true;
  }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: liuguangqiang/IPicker

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
    event.startTracking();
    return true;
  }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: gpfduoduo/AirPlay-Receiver-on-Android

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  if (keyCode == KeyEvent.KEYCODE_BACK && getScale() > 1.0f) {
    // If we're zoomed in, pressing Back jumps out to show the entire
    // image, otherwise Back returns the user to the gallery.
    zoomTo(1.0f);
    return true;
  }
  return super.onKeyDown(keyCode, event);
}

代码示例来源:origin: google/ringdroid

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
  mVelocity++;
  int v = (int)Math.sqrt(1 + mVelocity / 2);
  if (mListener != null) {
    if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) {
      mListener.markerLeft(this, v);
      return true;
    } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT) {
      mListener.markerRight(this, v);
      return true;
    } else if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) {
      mListener.markerEnter(this);
      return true;
    }
  }
  return super.onKeyDown(keyCode, event);
}

相关文章

ImageView类方法