Java Code Examples for android.view.View.setOnDragListener()

The following are Jave code examples for showing how to use setOnDragListener() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: SmingZZick_App   File:   Source Code and License Vote up 7 votes
public StickerApplyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    StickerApplyViewHolder stickerApplyViewHolder = null;
    View view = null;
    if (viewType == TYPE_IMAGE) {
        view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_type_image, parent, false);
        stickerApplyViewHolder = new ImageStickerApplyViewHolder(view);
    } else if (viewType == TYPE_TEXT) {
        view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_type_text, parent, false);
        stickerApplyViewHolder = new TextStickerApplyViewHolder(view);

    return stickerApplyViewHolder;
Example 2
Project: Blockly   File:   Source Code and License Vote up 5 votes
 * @param trashIcon The view for toggling the trash.
public void setTrashIcon(View trashIcon) {
    if (trashIcon == null) {
    // The trash icon is always a drop target.
    trashIcon.setOnDragListener(new OnDragToTrashListener(mController));
    if (mTrashUi != null && mTrashIsCloseable) {
        // But we only need a click listener if the trash can be closed.
Example 3
Project: egma-shapi   File:   Source Code and License Vote up 5 votes
 * Register a drag listener.
 * @param area           drop area
 * @param listener       listener
 * @param droppableClass class which can be droppable.
public void register(View area, DragListener listener, List<Class<?>> droppableClass) {
    for (Class<?> droppable : droppableClass) {
Example 4
Project: PaoMovie   File:   Source Code and License Vote up 4 votes
private void bindDrapListener(View v) {