Back to project page android-drag-drop.
The source code is released under:
MIT License
If you think the Android project android-drag-drop listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.mydraggable; /* ww w . j a v a 2s . c o m*/ import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Point; import android.graphics.Paint.Style; import android.view.View; import android.view.ViewGroup; import android.view.View.DragShadowBuilder; public class MyDragShadowBuilder extends DragShadowBuilder { Paint mPaint; public MyDragShadowBuilder(View view){ super(view); // ?????? mPaint = new Paint(); // mPaint.setColor(0xFFDD0000); // ? // mPaint.setColor(0xFF000000); // ? mPaint.setColor(0xFF00FFFF); // ???? mPaint.setStrokeWidth(5); mPaint.setAntiAlias(true); mPaint.setStyle(Style.STROKE); } @Override public void onProvideShadowMetrics(Point shadowSize, Point shadowTouchPoint) { // TODO Auto-generated method stub super.onProvideShadowMetrics(shadowSize, shadowTouchPoint); } @Override public void onDrawShadow(Canvas canvas) { // TODO Auto-generated method stub super.onDrawShadow(canvas); canvas.drawRect(0, 0, canvas.getWidth(), canvas.getHeight(), mPaint); } }