我创建了 GridView Drag'n'Drop,并想在拖动开始时创建:
-item change scale
-layout sets dark mask
我的代码
@Override
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
holder = (Holder) view.getTag();
mItem = (Item) mAdapter.getItem(i);
ClipData.Item item = new ClipData.Item("","");
ClipData clipData = new ClipData(i+"", new String[]{ClipDescription.MIMETYPE_TEXT_PLAIN}, item);
View v = holder.image;
v.animate().scaleX(1.3f);// here i want to create Drag item bigger
// and how i can create a mask for layout?
holder.image.startDrag(clipData, new View.DragShadowBuilder(v), null, 0);
holder.image.setOnDragListener(this);
findViewById(R.id.package_btn).setOnDragListener(this);
mDragIndex = i;
return true;
}