本文整理了Java中android.view.View.drawableHotspotChanged()
方法的一些代码示例,展示了View.drawableHotspotChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.drawableHotspotChanged()
方法的具体详情如下:
包路径:android.view.View
类名称:View
方法名:drawableHotspotChanged
暂无
代码示例来源:origin: jdsjlzx/LRecyclerView
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (mIndicator != null) {
mIndicator.setHotspot(x, y);
}
}
代码示例来源:origin: mikepenz/AboutLibraries
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(View v, MotionEvent event) {
// Convert to view coordinates. Assumes the host view is
// a direct child and the view is not scrollable.
float x = event.getX() + v.getLeft();
float y = event.getY() + v.getTop();
final View rippleView = findRippleView(v);
//if we were not able to find the view to display the ripple on, continue.
if (rippleView == null) {
return false;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// Simulate motion on the view.
rippleView.drawableHotspotChanged(x, y);
}
// Simulate pressed state on the view.
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
rippleView.setPressed(true);
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
rippleView.setPressed(false);
break;
}
// Pass all events through to the host view.
return false;
}
代码示例来源:origin: dongjunkun/GanK
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (mIndicator != null) {
mIndicator.setHotspot(x, y);
}
}
代码示例来源:origin: darkskygit/VirtualApp
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (mIndicator != null) {
mIndicator.setHotspot(x, y);
}
}
代码示例来源:origin: chengzichen/KrGallery
@Override
public boolean onTouchEvent(MotionEvent event) {
if (Build.VERSION.SDK_INT >= 21) {
selector.drawableHotspotChanged(event.getX(), event.getY());
}
return super.onTouchEvent(event);
}
}
代码示例来源:origin: bzsome/VirtualApp-x326
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (mIndicator != null) {
mIndicator.setHotspot(x, y);
}
}
代码示例来源:origin: chengzichen/KrGallery
@Override
public boolean onTouchEvent(MotionEvent event) {
if (Build.VERSION.SDK_INT >= 21) {
selector.drawableHotspotChanged(event.getX(), event.getY());
}
return super.onTouchEvent(event);
}
}
代码示例来源:origin: chengzichen/KrGallery
child.getBackground().setVisible(true, false);
child.drawableHotspotChanged(x, y - child.getTop());
内容来源于网络,如有侵权,请联系作者删除!