Java Code Examples for android.view.View#OnDragListener

The following examples show how to use android.view.View#OnDragListener . 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: QuickRow.java    From LaunchTime with GNU General Public License v3.0 6 votes vote down vote up
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
Source File: MultiDragListener.java    From Android-Lib-Pen with Apache License 2.0 5 votes vote down vote up
@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 File: DSL.java    From anvil with MIT License 4 votes vote down vote up
public static Void onDrag(View.OnDragListener arg) {
  return BaseDSL.attr("onDrag", arg);
}
 
Example 4
Source File: DSL.java    From anvil with MIT License 4 votes vote down vote up
public static Void onDrag(View.OnDragListener arg) {
  return BaseDSL.attr("onDrag", arg);
}
 
Example 5
Source File: MultiDragListener.java    From Android-Lib-Pen with Apache License 2.0 4 votes vote down vote up
public void addListener(final View view, final View.OnDragListener listener) {
    this.listeners.put(view, listener);
}