本文整理了Java中android.widget.ImageView.onKeyDown()
方法的一些代码示例,展示了ImageView.onKeyDown()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.onKeyDown()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!