本文整理了Java中android.widget.ImageView.setOnHoverListener()
方法的一些代码示例,展示了ImageView.setOnHoverListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.setOnHoverListener()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:setOnHoverListener
暂无
代码示例来源:origin: commonsguy/cw-omnibus
thumbnailLarge.setOnHoverListener(this);
thumbnailLarge.setOnLongClickListener(this);
代码示例来源:origin: gearvrf/GearVRf-Demos
@Override
public void onInitView(GVRViewSceneObject gvrViewSceneObject, View view) {
mBackButton = view.findViewById(R.id.backButtonImage);
mBackButton.setOnClickListener(mClickListener);
mBackButton.setOnHoverListener(new View.OnHoverListener() {
@Override
public boolean onHover(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == MotionEvent.ACTION_HOVER_ENTER) {
mBackButtonObject.getRenderData().getMaterial().setOpacity(2.f);
if (mFocusListener != null) {
mFocusListener.onFocusGained(BackButton.this);
}
} else if (motionEvent.getAction() == MotionEvent.ACTION_HOVER_EXIT) {
mBackButtonObject.getRenderData().getMaterial().setOpacity(.5f);
if (mFocusListener != null) {
mFocusListener.onFocusLost(BackButton.this);
}
}
return false;
}
});
}
内容来源于网络,如有侵权,请联系作者删除!