Q:

Drag Shadow Using Item Touch Helper android

ItemTouchhelper Class in android helps only to move the entire view around the recyclerview. Is it possible to make a shadow of a view to be dragged(The original view to be in its place-fixed) using the Item touchHelper class?

A:

I overrode onChildDraw and made my own shadow
public void onChildDraw(Canvas c, RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
        super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);

        if (isCurrentlyActive) {
            if (actionState == ItemTouchHelper.ACTION_STATE_DRAG) {
                // make shadown
                isRotated = true;
            }
        } else {
            // view is going back to orig
            if (isRotated) {
                // undo shadow
            }
        }
    }

