本文整理了Java中android.graphics.drawable.Drawable.setHotspot()
方法的一些代码示例,展示了Drawable.setHotspot()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawable.setHotspot()
方法的具体详情如下:
包路径:android.graphics.drawable.Drawable
类名称:Drawable
方法名:setHotspot
暂无
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onTouch(View v, MotionEvent event){
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP){
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(),event.getY());
}
return(false);
}
代码示例来源:origin: nickbutcher/plaid
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (foreground != null) {
foreground.setHotspot(x, y);
}
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean onTouch(View v, MotionEvent event) {
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(), event.getY());
return(false);
}
});
代码示例来源:origin: commonsguy/cw-omnibus
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean onTouch(View v, MotionEvent event) {
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(), event.getY());
return(false);
}
});
代码示例来源:origin: nickbutcher/plaid
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (foreground != null) {
foreground.setHotspot(x, y);
}
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean onTouch(View v, MotionEvent event) {
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(), event.getY());
return(false);
}
});
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onTouch(View v, MotionEvent event){
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP){
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(),event.getY());
}
return(false);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onTouch(View v, MotionEvent event){
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP){
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(),event.getY());
}
return(false);
}
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public boolean onTouch(View v, MotionEvent event) {
if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP) {
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(), event.getY());
}
return(false);
}
代码示例来源:origin: commonsguy/cw-omnibus
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean onTouch(View v, MotionEvent event) {
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(), event.getY());
return(false);
}
});
代码示例来源:origin: commonsguy/cw-omnibus
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean onTouch(View v, MotionEvent event) {
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(), event.getY());
return(false);
}
});
代码示例来源:origin: commonsguy/cw-omnibus
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean onTouch(View v, MotionEvent event) {
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(), event.getY());
return(false);
}
});
代码示例来源:origin: nickbutcher/plaid
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (mForeground != null) {
mForeground.setHotspot(x, y);
}
}
}
代码示例来源:origin: commonsguy/cw-omnibus
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean onTouch(View v, MotionEvent event) {
v
.findViewById(R.id.row_content)
.getBackground()
.setHotspot(event.getX(), event.getY());
return(false);
}
});
代码示例来源:origin: facebook/litho
@Override
@TargetApi(LOLLIPOP)
public boolean onTouchEvent(MotionEvent event, View host) {
final Rect bounds = getBounds();
final int x = (int) event.getX() - bounds.left;
final int y = (int) event.getY() - bounds.top;
mDrawable.setHotspot(x, y);
return false;
}
代码示例来源:origin: xinghongfei/LookLook
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (foreground != null) {
foreground.setHotspot(x, y);
}
}
}
代码示例来源:origin: AlexMofer/ProjectX
@Override
public void setHotspot(float x, float y) {
if (mDrawable == null)
return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
mDrawable.setHotspot(x, y);
}
代码示例来源:origin: AlexMofer/ProjectX
@Override
public void setHotspot(float x, float y) {
if (mDrawable == null)
return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
mDrawable.setHotspot(x, y);
}
代码示例来源:origin: AlexMofer/ProjectX
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void setHotspot(float x, float y) {
if (mItems.isEmpty()) {
super.setHotspot(x, y);
return;
}
for (ChildDrawable child : mItems) {
child.getDrawable().setHotspot(x, y);
}
}
代码示例来源:origin: googlesamples/android-unsplash
@Override
public void drawableHotspotChanged(float x, float y) {
super.drawableHotspotChanged(x, y);
if (foreground != null) {
foreground.setHotspot(x, y);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!