Is it possible to make a drag shadow opaque?

前端 未结 5 1054
粉色の甜心
粉色の甜心 2020-12-16 06:14

As question states. here is my dragshadowbuilder for reference. As you know, the shadow that is created when you drag is translucent. Is there anyway to make it opaque? (ful

5条回答
  •  猫巷女王i
    2020-12-16 06:44

    Dont know if someone is aware of it or not, We can achieve the same using flag DRAG_FLAG_OPAQUE, So the correspondind startDrag method will look like as below:

        View.DragShadowBuilder dragShadowBuilder = new View.DragShadowBuilder(view);
        view.startDrag(clipData, dragShadowBuilder, view, DRAG_FLAG_OPAQUE);
    

提交回复
热议问题