Java Code Examples for android.view.View#OnDragListener

The following examples show how to use android.view.View#OnDragListener . These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
public QuickRow(final View.OnDragListener dragListener, MainActivity mainActivity) {

        mMainActivity = mainActivity;
        mStyle = GlobState.getStyle(mMainActivity);

        mQuickRow = mMainActivity.findViewById(R.id.layout_quickrow);

        mQuickRowScroller = mMainActivity.findViewById(R.id.layout_quickrow_scroll);

        mQuickRow.setOnDragListener(dragListener);
        mQuickRowScroller.setOnDragListener(new View.OnDragListener() {
            @Override
            public boolean onDrag(View view, DragEvent dragEvent) {
                return dragListener.onDrag(mQuickRow, dragEvent);
            }
        });
    }
 
Example 2
@Override
public boolean onDrag(final View view, final DragEvent event) {
    final View.OnDragListener listener = this.listeners.get(event.getLocalState());

    if (listener == null) {
        return false;
    }

    return listener.onDrag(view, event);
}
 
Example 3
Source Project: anvil   File: DSL.java    License: MIT License 4 votes vote down vote up
public static Void onDrag(View.OnDragListener arg) {
  return BaseDSL.attr("onDrag", arg);
}
 
Example 4
Source Project: anvil   File: DSL.java    License: MIT License 4 votes vote down vote up
public static Void onDrag(View.OnDragListener arg) {
  return BaseDSL.attr("onDrag", arg);
}
 
Example 5
public void addListener(final View view, final View.OnDragListener listener) {
    this.listeners.put(view, listener);
}