本文整理了Java中android.graphics.drawable.Drawable.setHotspotBounds()
方法的一些代码示例,展示了Drawable.setHotspotBounds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawable.setHotspotBounds()
方法的具体详情如下:
包路径:android.graphics.drawable.Drawable
类名称:Drawable
方法名:setHotspotBounds
暂无
代码示例来源:origin: qiujuer/Genius-Android
/**
* As our DiscreteSeekBar implementation uses a circular drawable on API < 21
* we want to use the same method to set its bounds as the Ripple's hotspot bounds.
*
* @param drawable Drawable
* @param left Left
* @param top Top
* @param right Right
* @param bottom Bottom
*/
public static void setHotspotBounds(Drawable drawable, int left, int top, int right, int bottom) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
//We don't want the full size rect, Lollipop ripple would be too big
int size = (right - left) / 8;
drawable.setHotspotBounds(left + size, top + size, right - size, bottom - size);
} else {
drawable.setBounds(left, top, right, bottom);
}
}
代码示例来源:origin: DreaminginCodeZH/MaterialProgressBar
d.setHotspotBounds(hotspotBounds.left, hotspotBounds.top,
hotspotBounds.right, hotspotBounds.bottom);
代码示例来源:origin: AlexMofer/ProjectX
@Override
public void setHotspotBounds(int left, int top, int right, int bottom) {
if (mDrawable == null)
return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
mDrawable.setHotspotBounds(left, top, right, bottom);
}
代码示例来源:origin: AlexMofer/ProjectX
@Override
public void setHotspotBounds(int left, int top, int right, int bottom) {
if (mDrawable == null)
return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
mDrawable.setHotspotBounds(left, top, right, bottom);
}
代码示例来源:origin: kingargyle/adt-leanback-support
public static void setHotspotBounds(Drawable drawable, int left, int top,
int right, int bottom) {
drawable.setHotspotBounds( left, top, right, bottom);
}
代码示例来源:origin: MCMrARM/revolution-irc
@TargetApi(Build.VERSION_CODES.M)
@Override
public void setHotspotBounds(int left, int top, int right, int bottom) {
mDrawable.setHotspotBounds(left, top, right, bottom);
}
代码示例来源:origin: AlexMofer/ProjectX
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void setHotspotBounds(int left, int top, int right, int bottom) {
if (mItems.isEmpty()) {
super.setHotspotBounds(left, top, right, bottom);
return;
}
for (ChildDrawable child : mItems) {
child.getDrawable().setHotspotBounds(left, top, right, bottom);
}
}
代码示例来源:origin: AlexMofer/ProjectX
@Override
public void setHotspotBounds(int left, int top, int right, int bottom) {
super.setHotspotBounds(left, top, right, bottom);
if (mProgressDrawable == null)
return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
mProgressDrawable.setHotspotBounds(left, top, right, bottom);
}
代码示例来源:origin: apptik/MultiSlider
private void setHotspot(float x, float y, Thumb thumb) {
if (thumb == null || thumb.getThumb() == null) return;
final Drawable background = getBackground();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && background != null) {
background.setHotspot(x, y);
Rect rect = thumb.getThumb().getBounds();
final int offsetY = getPaddingTop();
background.setHotspotBounds(rect.left, rect.top + offsetY,
rect.right, rect.bottom + offsetY);
}
}
代码示例来源:origin: com.albedinsky.android/ui-widget-picker
if (background != null && mAnimations.shouldDraw() && UiConfig.MATERIALIZED) {
background.setHotspotBounds(0, 0, 0, 0);
代码示例来源:origin: com.albedinsky.android/ui
if (background != null && mAnimations.shouldDraw() && UiConfig.MATERIALIZED) {
background.setHotspotBounds(0, 0, 0, 0);
代码示例来源:origin: rcketscientist/ToggleButtons
background.setHotspotBounds(left, top, right, bottom);
内容来源于网络,如有侵权,请联系作者删除!