【发布时间】:2014-04-22 12:16:16
【问题描述】:
在拖放活动中,
我想将图像拖放到 TextView 上。 并且想将文本视图更改为图像视图,我已经放弃了。
case DragEvent.ACTION_DROP:
View view = (View) event.getLocalState();
view.setVisibility(View.INVISIBLE);
//This is the textView of the Traget
TextView dropTarget = (TextView) dragView;
//Possibly now the View would be an image View now,
//view being dragged and dropped
ImageView dropped = (ImageView) view;
//Now here I want to set the textView of dropTarget as the ImageView of dropped, THIS I WANT TO UNDERSTAND TO HOW TO DO THIS
dropTarget.setAnimation(dropped.getDrawable());
break;
请帮忙!!!!
【问题讨论】:
标签: android drag-and-drop textview imageview settext