Use drawableHotspotChanged for Lollipop
This commit is contained in:
1 parent
dd23537302
commit
05a9f2aa12
1 file changed
+10
-1
@@ -70,8 +70,10 @@ public class CheckTextView extends TextView implements OnClickListener, Hotspota
|
||||
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG);
|
||||
mPaint.setColor(MASK);
|
||||
|
||||
setOnTouchListener(new HotspotTouchHelper(this));
|
||||
setOnClickListener(this);
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
|
||||
setOnTouchListener(new HotspotTouchHelper(this));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,6 +83,13 @@ public class CheckTextView extends TextView implements OnClickListener, Hotspota
|
||||
mMaxRadius = MathUtils.coverageRadius(getWidth(), getHeight(), x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawableHotspotChanged(float x, float y) {
|
||||
mX = x;
|
||||
mY = y;
|
||||
mMaxRadius = MathUtils.coverageRadius(getWidth(), getHeight(), x, y);
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public void setRadius(float radius) {
|
||||
float bigger = Math.max(mRadius, radius);
|
||||
|
||||
Reference in new issue
Block a user