Code example for ClipData

Methods: getItemAt

0
				v.setBackgroundColor(DEFAULT_BG_COLOR);
			} 
			else if(event.getAction() == DragEvent.ACTION_DROP) {
				// Perform drop 
				ClipData clip = event.getClipData();
				ClipData.Item item = clip.getItemAt(0);
				String text = item.getText().toString();
				 
				((TextView) v).setText(text);
				v.setBackgroundColor(DEFAULT_BG_COLOR);
			} 
			// Send true to listen All Drag Events. 
			return true;  
		} 
    } 
} 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE