Java Code Examples for android.view.DragEvent#ACTION_DRAG_ENTERED

The following examples show how to use android.view.DragEvent#ACTION_DRAG_ENTERED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DragListenerGridView.java    From PlusDemo with Apache License 2.0 6 votes vote down vote up
@Override
public boolean onDrag(View v, DragEvent event) {
    switch (event.getAction()) {
        case DragEvent.ACTION_DRAG_STARTED:
            if (event.getLocalState() == v) {
                v.setVisibility(INVISIBLE);
            }
            break;
        case DragEvent.ACTION_DRAG_ENTERED:
            System.out.println("draggg");
            if (event.getLocalState() != v) {
                sort(v);
            }
            break;
        case DragEvent.ACTION_DRAG_EXITED:
            break;
        case DragEvent.ACTION_DRAG_ENDED:
            v.setVisibility(VISIBLE);
            break;
    }
    return true;
}
 
Example 2
Source File: LauncherDragListener.java    From DistroHopper with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean onDrag (View view, DragEvent event)
{
	try
	{
		switch (event.getAction ())
		{
			case DragEvent.ACTION_DRAG_ENTERED:
				this.appManager.startedDraggingPinnedApp ();
				break;
			case DragEvent.ACTION_DROP:
			case DragEvent.ACTION_DRAG_EXITED:
				this.appManager.stoppedDraggingPinnedApp ();
				break;
		}
	}
	catch (Exception ex)
	{
		ExceptionHandler exh = new ExceptionHandler (ex);
		exh.show (this.appManager.getContext ());
	}

	return true;
}
 
Example 3
Source File: RecipientEditTextView.java    From talk-android with MIT License 6 votes vote down vote up
/**
 * Handles drag event.
 */
@Override
public boolean onDragEvent(DragEvent event) {
    switch (event.getAction()) {
        case DragEvent.ACTION_DRAG_STARTED:
            // Only handle plain text drag and drop.
            return event.getClipDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN);
        case DragEvent.ACTION_DRAG_ENTERED:
            requestFocus();
            return true;
        case DragEvent.ACTION_DROP:
            handlePasteClip(event.getClipData());
            return true;
    }
    return false;
}
 
Example 4
Source File: TextChipsEditView.java    From talk-android with MIT License 6 votes vote down vote up
/**
 * Handles drag event.
 */
@Override
public boolean onDragEvent(DragEvent event) {
    switch (event.getAction()) {
        case DragEvent.ACTION_DRAG_STARTED:
            // Only handle plain text drag and drop.
            return event.getClipDescription().hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN);
        case DragEvent.ACTION_DRAG_ENTERED:
            requestFocus();
            return true;
        case DragEvent.ACTION_DROP:
            handlePasteClip(event.getClipData());
            return true;
    }
    return false;
}
 
Example 5
Source File: DragActivity.java    From codeexamples-android with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public boolean onDrag(View v, DragEvent event) {
	switch (event.getAction()) {
	case DragEvent.ACTION_DRAG_STARTED:
		// Do nothing
		break;
	case DragEvent.ACTION_DRAG_ENTERED:
		v.setBackground(enterShape);
		break;
	case DragEvent.ACTION_DRAG_EXITED:
		v.setBackground(normalShape);
		break;
	case DragEvent.ACTION_DROP:
		// view dropped, reassign the view to the new ViewGroup
		View view = (View) event.getLocalState();
		ViewGroup owner = (ViewGroup) view.getParent();
		owner.removeView(view);
		LinearLayout container = (LinearLayout) v;
		container.addView(view);
		view.setVisibility(View.VISIBLE);
		break;
	case DragEvent.ACTION_DRAG_ENDED:
		v.setBackground(normalShape);
	default:
		break;
	}
	return true;
}
 
Example 6
Source File: ImageDragListener.java    From user-interface-samples with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onDrag(View view, DragEvent event) {
    // Change the color of the target for all events.
    // For the drop action, set the view to the dropped image.
    switch (event.getAction()) {
        case DragEvent.ACTION_DRAG_STARTED:
            setTargetColor(view, COLOR_ACTIVE);
            return true;

        case DragEvent.ACTION_DRAG_ENTERED:
            setTargetColor(view, COLOR_HOVER);
            return true;

        case DragEvent.ACTION_DRAG_LOCATION:
            processLocation(event.getX(), event.getY());
            return true;

        case DragEvent.ACTION_DRAG_EXITED:
            setTargetColor(view, COLOR_ACTIVE);
            return true;

        case DragEvent.ACTION_DROP:
            return processDrop(view, event);

        case DragEvent.ACTION_DRAG_ENDED:
            setTargetColor(view, COLOR_INACTIVE);
            return true;

        default:
            break;
    }

    return false;
}
 
Example 7
Source File: DragActivity.java    From codeexamples-android with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public boolean onDrag(View v, DragEvent event) {
	int action = event.getAction();
	switch (event.getAction()) {
	case DragEvent.ACTION_DRAG_STARTED:
		// Do nothing
		break;
	case DragEvent.ACTION_DRAG_ENTERED:
		v.setBackgroundDrawable(enterShape);
		break;
	case DragEvent.ACTION_DRAG_EXITED:
		v.setBackgroundDrawable(normalShape);
		break;
	case DragEvent.ACTION_DROP:
		// Dropped, reassign View to ViewGroup
		View view = (View) event.getLocalState();
		ViewGroup owner = (ViewGroup) view.getParent();
		// TODO 1 removeView from owner
		// TODO 2 add to v which is a LinearLayout
		// TODO 3 set view to View.Visible
		
		break;
	case DragEvent.ACTION_DRAG_ENDED:
		v.setBackgroundDrawable(normalShape);
	default:
		break;
	}
	return true;
}
 
Example 8
Source File: TrashDragListener.java    From DistroHopper with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onDrag (View view, DragEvent event)
{
	try
	{
		AppLauncher lalTrash = (AppLauncher) view;
		if (this.colour == -1)
			this.colour = lalTrash.getColour ();

		switch (event.getAction ())
		{
			case DragEvent.ACTION_DRAG_ENTERED:
				this.appManager.startedDraggingPinnedApp();
				lalTrash.setColour (Color.rgb (255, 40, 40));
				break;
			case DragEvent.ACTION_DROP: // Falls through //
				int index = Integer.parseInt (event.getClipData ().getDescription ().getLabel ().toString ());
				this.appManager.unpin (index);

				this.appManager.stoppedDraggingPinnedApp ();
			case DragEvent.ACTION_DRAG_EXITED:
				lalTrash.setColour (this.colour);
				break;
		}
	}
	catch (Exception ex)
	{
		ExceptionHandler exh = new ExceptionHandler (ex);
		exh.show (this.appManager.getContext ());
	}

	return true;
}
 
Example 9
Source File: AppLauncherDragListener.java    From DistroHopper with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onDrag (View view, DragEvent event)
{
	try
	{
		AppLauncher appLauncher = (AppLauncher) view;
		App app = appLauncher.getApp ();

		switch (event.getAction ())
		{
			case DragEvent.ACTION_DRAG_ENTERED:
				appLauncher.animate ().setStartDelay (0).setDuration (120).alpha (0.2F);
				break;
			case DragEvent.ACTION_DROP: // Falls through //
				int oldIndex = Integer.parseInt (event.getClipData ().getDescription ().getLabel ().toString ());
				int newIndex = this.appManager.indexOfPinned (app);

				this.appManager.movePinnedApp (oldIndex, newIndex);
				this.appManager.refreshPinnedView ();

				this.appManager.savePinnedApps ();
			case DragEvent.ACTION_DRAG_ENDED: // Falls through //
				this.appManager.stoppedDraggingPinnedApp ();
			case DragEvent.ACTION_DRAG_EXITED:
				if (Build.VERSION.SDK_INT >= 14)
					appLauncher.animate ().setStartDelay (0).setDuration (120).alpha (0.9F);
				else
					appLauncher.setAlpha (0.9F);
				break;
		}
	}
	catch (Exception ex)
	{
		ExceptionHandler exh = new ExceptionHandler (ex);
		exh.show (this.appManager.getContext ());
	}

	return true;
}
 
Example 10
Source File: StoreExampleActivity.java    From android-profile with Apache License 2.0 5 votes vote down vote up
@Override
        public boolean onDrag(View v, DragEvent event) {
            View view = (View) event.getLocalState();
//            ViewGroup owner = (ViewGroup) view.getParent();
//            LinearLayout container = (LinearLayout) v;
            switch (event.getAction()) {
                case DragEvent.ACTION_DRAG_STARTED:
                    break;
                case DragEvent.ACTION_DRAG_ENTERED:
                    v.setBackgroundDrawable(enterShape);
                    break;
                case DragEvent.ACTION_DRAG_EXITED:
                    v.setBackgroundDrawable(normalShape);
                    break;
                case DragEvent.ACTION_DROP:

                    // Dropped, reassign View to ViewGroup

                    ViewGroup left = (ViewGroup)findViewById(R.id.leftbox);
                    ViewGroup right = (ViewGroup)findViewById(R.id.rightbox);

                    if (right == v){
                        left.removeView(view);
                        right.addView(view);
                        view.setVisibility(View.VISIBLE);

                        // Once the user drags the SOOMBOT to the empty box, we open the store.
                        openStore();
                    }
                    break;
                case DragEvent.ACTION_DRAG_ENDED:
                    view.setVisibility(View.VISIBLE);

                    v.setBackgroundDrawable(normalShape);
                default:
                    break;
            }
            return true;
        }
 
Example 11
Source File: HomeActivityDelegate.java    From Taskbar with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onDrag(View v, DragEvent event) {
    switch(event.getAction()) {
        case DragEvent.ACTION_DRAG_STARTED:
        default:
            // do nothing
            break;
        case DragEvent.ACTION_DRAG_ENTERED:
            FrameLayout container = (FrameLayout) v;
            if(container.getChildCount() == 0
                    || startDragIndex == desktopIcons.indexOfChild(container)) {
                v.setBackgroundColor(U.getAccentColor(HomeActivityDelegate.this));
                v.setAlpha(0.5f);
            }
            break;
        case DragEvent.ACTION_DRAG_ENDED:
            View view = (View) event.getLocalState();
            view.setVisibility(View.VISIBLE);
            // fall through
        case DragEvent.ACTION_DRAG_EXITED:
            v.setBackground(null);
            v.setAlpha(1);
            break;
        case DragEvent.ACTION_DROP:
            FrameLayout container2 = (FrameLayout) v;
            if(container2.getChildCount() == 0) {
                // Dropped, reassign View to ViewGroup
                View view2 = (View) event.getLocalState();
                ViewGroup owner = (ViewGroup) view2.getParent();
                owner.removeView(view2);
                container2.addView(view2);

                endDragIndex = desktopIcons.indexOfChild(container2);
                reassignDroppedIcon();
            }
            break;
    }
    return true;
}
 
Example 12
Source File: DismissibleOnDragListener.java    From DismissibleImageView with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onDrag(View v, DragEvent event) {
    switch(event.getAction()) {
        case DragEvent.ACTION_DRAG_STARTED:
            onDropListener.onDragStarted();
            return true;

        case DragEvent.ACTION_DRAG_ENTERED:
            return true;

        case DragEvent.ACTION_DRAG_LOCATION:
            // Ignore the event
            onDropListener.onDragLocation(event.getX(), event.getY());
            return true;

        case DragEvent.ACTION_DRAG_EXITED:
            return true;

        case DragEvent.ACTION_DROP:
            onDropListener.onDrop();
            return true;

        case DragEvent.ACTION_DRAG_ENDED:
            onDropListener.onDragEnded();
            return true;

        default:
            break;
    }

    return false;
}
 
Example 13
Source File: DragActivity.java    From codeexamples-android with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public boolean onDrag(View v, DragEvent event) {
	switch (event.getAction()) {
	case DragEvent.ACTION_DRAG_STARTED:
		// Do nothing
		break;
	case DragEvent.ACTION_DRAG_ENTERED:
		v.setBackground(enterShape);
		break;
	case DragEvent.ACTION_DRAG_EXITED:
		v.setBackground(normalShape);
		break;
	case DragEvent.ACTION_DROP:
		// view dropped, reassign the view to the new ViewGroup
		View view = (View) event.getLocalState();
		ViewGroup owner = (ViewGroup) view.getParent();
		owner.removeView(view);
		LinearLayout container = (LinearLayout) v;
		container.addView(view);
		view.setVisibility(View.VISIBLE);
		break;
	case DragEvent.ACTION_DRAG_ENDED:
		v.setBackground(normalShape);
	default:
		break;
	}
	return true;
}
 
Example 14
Source File: ImageDragListener.java    From android-DragAndDropAcrossApps with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onDrag(View view, DragEvent event) {
    // Change the color of the target for all events.
    // For the drop action, set the view to the dropped image.
    switch (event.getAction()) {
        case DragEvent.ACTION_DRAG_STARTED:
            setTargetColor(view, COLOR_ACTIVE);
            return true;

        case DragEvent.ACTION_DRAG_ENTERED:
            setTargetColor(view, COLOR_HOVER);
            return true;

        case DragEvent.ACTION_DRAG_LOCATION:
            processLocation(event.getX(), event.getY());
            return true;

        case DragEvent.ACTION_DRAG_EXITED:
            setTargetColor(view, COLOR_ACTIVE);
            return true;

        case DragEvent.ACTION_DROP:
            return processDrop(view, event);

        case DragEvent.ACTION_DRAG_ENDED:
            setTargetColor(view, COLOR_INACTIVE);
            return true;

        default:
            break;
    }

    return false;
}
 
Example 15
Source File: DragDriver.java    From LaunchEnr with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onDragEvent (DragEvent event) {
    final int action = event.getAction();

    switch (action) {
        case DragEvent.ACTION_DRAG_STARTED:
            mLastX = event.getX();
            mLastY = event.getY();
            return true;

        case DragEvent.ACTION_DRAG_ENTERED:
            return true;

        case DragEvent.ACTION_DRAG_LOCATION:
            mLastX = event.getX();
            mLastY = event.getY();
            mEventListener.onDriverDragMove(event.getX(), event.getY());
            return true;

        case DragEvent.ACTION_DROP:
            mLastX = event.getX();
            mLastY = event.getY();
            mEventListener.onDriverDragMove(event.getX(), event.getY());
            mEventListener.onDriverDragEnd(mLastX, mLastY);
            return true;
        case DragEvent.ACTION_DRAG_EXITED:
            mEventListener.onDriverDragExitWindow();
            return true;

        case DragEvent.ACTION_DRAG_ENDED:
            mEventListener.onDriverDragCancel();
            return true;

        default:
            return false;
    }
}
 
Example 16
Source File: ImageDragListener.java    From user-interface-samples with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onDrag(View view, DragEvent event) {
    switch (event.getAction()) {
        case DragEvent.ACTION_DRAG_STARTED:
            setTargetColor(view, COLOR_ACTIVE);
            return true;

        case DragEvent.ACTION_DRAG_ENTERED:
            setTargetColor(view, COLOR_HOVER);
            return true;

        case DragEvent.ACTION_DRAG_LOCATION:
            processLocation(event.getX(), event.getY());
            return true;

        case DragEvent.ACTION_DRAG_EXITED:
            setTargetColor(view, COLOR_ACTIVE);
            return true;

        case DragEvent.ACTION_DROP:
            return processDrop(view, event);

        case DragEvent.ACTION_DRAG_ENDED:
            setTargetColor(view, COLOR_INACTIVE);
            return true;

        default:
            break;
    }

    return false;
}
 
Example 17
Source File: PipeOnDragListener.java    From ssj with GNU General Public License v3.0 4 votes vote down vote up
/**
     * @param v     View
     * @param event DragEvent
     * @return boolean
     */
    @Override
    public boolean onDrag(final View v, final DragEvent event)
    {
        if (v instanceof PipeView)
        {
            final PipeView pipeView = (PipeView) v;
            switch (event.getAction())
            {
                case DragEvent.ACTION_DRAG_STARTED:
                {
                    //init values
                    xCoord = 0;
                    yCoord = 0;
                    dropped = false;
                    createRecycleBin(pipeView);
                    break;
                }
                case DragEvent.ACTION_DRAG_ENTERED:
                    break;
                case DragEvent.ACTION_DRAG_EXITED:
                    break;
                case DragEvent.ACTION_DROP:
                    //update drop location
                    xCoord = event.getX();
                    yCoord = event.getY();
                    dropped = true;
                    ComponentView view = (ComponentView) event.getLocalState();
                    pipeView.getGrid().setGridValue(view.getGridX(), view.getGridY(), false);
                    break;
                case DragEvent.ACTION_DRAG_ENDED:
                    cleanup(pipeView, event);
                    break;
                case DragEvent.ACTION_DRAG_LOCATION:
                {
//                    //@todo add scroll behaviour to drag and drop
//                    HorizontalScrollView horizontalScrollView = (HorizontalScrollView) pipeView.getParent();
//                    if (horizontalScrollView != null)
//                    {
//                        ScrollView scrollView = (ScrollView) horizontalScrollView.getParent();
//                        if (scrollView != null)
//                        {
//                            //way one
//                            int y = Math.round(event.getY());
//                            int translatedY = y - scrollView.getScrollY();
//                            int threshold = 50;
//                            // make a scrolling up due the y has passed the threshold
//                            if (translatedY < threshold) {
//                                // make a scroll up by 30 px
//                                scrollView.smoothScrollBy(0, -30);
//                            }
//                            // make a autoscrolling down due y has passed the 500 px border
//                            if (translatedY + threshold > 500) {
//                                // make a scroll down by 30 px
//                                scrollView.smoothScrollBy(0, 30);
//                            }
//                            //way two
//                            int topOfDropZone = pipeView.getTop();
//                            int bottomOfDropZone = pipeView.getBottom();
//                            int scrollY = scrollView.getScrollY();
//                            int scrollViewHeight = scrollView.getMeasuredHeight();
//                            Log.d("location: Scroll Y: " + scrollY + " Scroll Y+Height: " + (scrollY + scrollViewHeight));
//                            Log.d(" top: " + topOfDropZone + " bottom: " + bottomOfDropZone);
//                            if (bottomOfDropZone > (scrollY + scrollViewHeight - 100))
//                            {
//                                scrollView.smoothScrollBy(0, 30);
//                            }
//                            if (topOfDropZone < (scrollY + 100))
//                            {
//                                scrollView.smoothScrollBy(0, -30);
//                            }
//                        }
//                    }
                    break;
                }
                default:
                    break;
            }
            return true;
        }
        return false;
    }
 
Example 18
Source File: EditFragment.java    From Passbook with Apache License 2.0 4 votes vote down vote up
@Override
public boolean onDrag(View v, DragEvent event) {
    final int action = event.getAction();
    switch(action) {
        case DragEvent.ACTION_DRAG_STARTED:
            return true;

        case DragEvent.ACTION_DRAG_ENTERED:
            if(v==mDeleteView) {
                mDeleteView.setColorFilter(C.ThemedColors[C.colorAccent]);
                mDeleteView.setScaleX(1.2f);
                mDeleteView.setScaleY(1.2f);
            }
            else {
                mDeleteView.setColorFilter(C.ThemedColors[C.colorTextNormal]);
                mDeleteView.setScaleX(1.0f);
                mDeleteView.setScaleY(1.0f);
                EntryHolder eh = (EntryHolder) v.getTag();
                if (mDragged.mEntryLayout != eh.mEntryLayout) {
                    int index = mEntries.indexOf(eh);
                    mDeleteView.animate().setDuration(300).y(v.getY() +
                            (mItemHeight - mDeleteView.getMeasuredHeight())/2);
                    eh = mEntries.get(mIndex);
                    mEntries.remove(mIndex);
                    mEntries.add(index, eh);
                    mContainer.removeViewAt(mIndex);
                    mContainer.addView(eh.mEntryLayout,index);
                    mIndex = index;
                }
            }
            return true;

        case DragEvent.ACTION_DRAG_ENDED:
            mDeleteView.setVisibility(View.INVISIBLE);
            if(v!=mDeleteView) {
                mDragged.mEntryContainer.setVisibility(View.VISIBLE);
                mDragged.mEntryLayout.setAlpha(1.0f);
            }
            return true;

        case DragEvent.ACTION_DRAG_LOCATION:
            int yPosition = (int)v.getY();
            int scrollY = mScroll.getScrollY();
            if(yPosition < scrollY) {
                mScroll.smoothScrollBy(0, -mItemHeight);
            }
            if(yPosition - scrollY > mAdjustScrollY) {
                mScroll.smoothScrollBy(0, mItemHeight);
            }
            return true;

        case DragEvent.ACTION_DROP:
            if(v==mDeleteView) {
                delete(mDragged);
            }
            return true;

    }
    return false;
}
 
Example 19
Source File: ViewDragListenerView.java    From Android_UE with Apache License 2.0 4 votes vote down vote up
@Override
    public boolean onDrag(View view, DragEvent dragEvent) {
        switch (dragEvent.getAction()) {
            case DragEvent.ACTION_DRAG_STARTED:
                if (dragEvent.getLocalState() == view) {
                    view.setVisibility(View.INVISIBLE);
                }
                // 开始拖拽
                Log.e(TAG, "开始拖拽");
                break;
            case DragEvent.ACTION_DRAG_LOCATION:
                // 主要是感觉是在拖动中就会回调
//                Log.e(TAG, "主要是感觉是在拖动中就会回调");
                break;
            case DragEvent.ACTION_DROP:
                // 向用户已释放拖动阴影的视图发出信号,拖动点位于视图的边界框内,而不在可接受数据的后代视图中。
                Log.e(TAG, "向用户已释放拖动阴影的视图发出信号,拖动点位于视图的边界框内,而不在可接受数据的后代视图中。");
                break;
            case DragEvent.ACTION_DRAG_ENDED:
                // 拖拽已结束
                Log.e(TAG, "拖拽已结束");
                if (dragEvent.getLocalState() == view) {
                    view.setVisibility(View.VISIBLE);
                }
                break;
            case DragEvent.ACTION_DRAG_ENTERED:
                // 拖拽的View已经到了其他View的范围,判断点为手指触摸的位置
                if (dragEvent.getLocalState() != view) {
                    // 每个View都会收到的,所以要排除掉自己
                    sortView(view);
                    Log.e(TAG, "拖拽的View已经到了其他View的范围");

                }
                break;
            case DragEvent.ACTION_DRAG_EXITED:
                // 移出了当前View的范围,判断点为手指触摸的位置
                Log.e(TAG, "移出了当前View的范围");
                break;
        }
        return true;
    }
 
Example 20
Source File: DraggableDot.java    From codeexamples-android with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Drag and drop
 */
@Override
public boolean onDragEvent(DragEvent event) {
    boolean result = false;
    switch (event.getAction()) {
    case DragEvent.ACTION_DRAG_STARTED: {
        // claim to accept any dragged content
        Log.i(TAG, "Drag started, event=" + event);
        // cache whether we accept the drag to return for LOCATION events
        mDragInProgress = true;
        mAcceptsDrag = result = true;
        // Redraw in the new visual state if we are a potential drop target
        if (mAcceptsDrag) {
            invalidate();
        }
    } break;

    case DragEvent.ACTION_DRAG_ENDED: {
        Log.i(TAG, "Drag ended.");
        if (mAcceptsDrag) {
            invalidate();
        }
        mDragInProgress = false;
        mHovering = false;
    } break;

    case DragEvent.ACTION_DRAG_LOCATION: {
        // we returned true to DRAG_STARTED, so return true here
        Log.i(TAG, "... seeing drag locations ...");
        result = mAcceptsDrag;
    } break;

    case DragEvent.ACTION_DROP: {
        Log.i(TAG, "Got a drop! dot=" + this + " event=" + event);
        if (mAnrType == ANR_DROP) {
            sleepSixSeconds();
        }
        processDrop(event);
        result = true;
    } break;

    case DragEvent.ACTION_DRAG_ENTERED: {
        Log.i(TAG, "Entered dot @ " + this);
        mHovering = true;
        invalidate();
    } break;

    case DragEvent.ACTION_DRAG_EXITED: {
        Log.i(TAG, "Exited dot @ " + this);
        mHovering = false;
        invalidate();
    } break;

    default:
        Log.i(TAG, "other drag event: " + event);
        result = mAcceptsDrag;
        break;
    }

    return result;
}