Drag and Drop for Android API 7++
<p>I got to use a public library from someone who created the Drag and Drop funcionability for API 7++, because in android it is implemented officially since API 11.</p>

<p>I dont know how i can use it correct.</p>

<p>I want that i Drag Button1 over Button2.
Button2 should have the Text of Button1 now.
But if i drag Button2 now again to example Button3, the original Text of Button2 should appear. 
I already managed that Button 2 has the text of Button1, but then going further is a problem for me..
I dont know how i can achieve that...</p>

<p>Here is some Code:</p>

<pre><code>public void setDragArea(final DragArea dragArea, final TextView reportView){
        this.setOnTouchListener(new View.OnTouchListener(){
          public boolean onTouch(View view, MotionEvent event){
            if (event.getAction() == MotionEvent.ACTION_DOWN) { 
              Bundle data = new Bundle();
              data.putCharSequence("buttonText", getText());
              dragArea.startDrag(data, new DrawableDragShadowBuilder(DraggableDot.this, mTranslucentDot, new Point((int)event.getX() - getPaddingLeft(), (int)event.getY() - getPaddingTop())));
              return true;
            } else {
              return false;
            }
          }
        });

        dragArea.addDragListener(DraggableDot.this, new OnDragListener(){
          public void onDrag(View view, DragEvent dragEvent){
              final Bundle data = dragEvent.getBundle();
            switch (dragEvent.getAction()){
              case DragEvent.ACTION_DRAG_STARTED:
                DraggableDot.this.setBackgroundDrawable(mGreenDot);
                break;
              case DragEvent.ACTION_DRAG_ENTERED:               
                DraggableDot.this.setBackgroundDrawable(mWhiteDot);
                break;
              case DragEvent.ACTION_DRAG_EXITED:
                DraggableDot.this.setBackgroundDrawable(mGreenDot);
                break;
              case DragEvent.ACTION_DROP:               
                final CharSequence dropText = data.getCharSequence("buttonText");           

                DraggableDot.this.setText(dropText);
                DraggableDot.this.setBackgroundDrawable(mRedDot);
                break;
              case DragEvent.ACTION_DRAG_ENDED:
                DraggableDot.this.setBackgroundDrawable(mRedDot);
                break;
              default:
                break;
            }
          }

        });
      }
</code></pre>

<p>Drag.xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    &gt;
&lt;com.lernapp.src.DragArea
    android:id="@+id/drag_area"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"
    android:layout_weight="1"
    &gt;
    &lt;RelativeLayout
        android:id="@+id/dots"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"&gt;
        &lt;com.lernapp.src.DraggableDot
            android:id="@+id/dot_one"
            android:text="Ich bin Button 1 Text"
            android:background="@+drawable/red_dot"
            android:textStyle="bold"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"
            android:layout_marginRight="10dp"
            /&gt;
        &lt;com.lernapp.src.DraggableDot
            android:id="@+id/dot_two"
            android:text="Ich bin Button 2 Text"
            android:background="@drawable/red_dot"
            android:textStyle="bold"
            android:layout_below="@id/dot_one"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="10dp"
            /&gt;
        &lt;com.lernapp.src.DraggableDot
            android:id="@+id/dot_three"
            android:text="3"
            android:background="@+drawable/white_dot"
            android:textStyle="bold"
            android:layout_toRightOf="@id/dot_one"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"
            android:layout_marginRight="10dp"
            /&gt;
        &lt;com.lernapp.src.DraggableDot
            android:id="@+id/dot_four"
            android:text="4"
            android:background="@+drawable/white_dot"
            android:textStyle="bold"
            android:layout_below="@id/dot_three"
            android:layout_toRightOf="@id/dot_two"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"
            android:layout_marginRight="10dp"
            /&gt;
    &lt;/RelativeLayout&gt;
&lt;/com.lernapp.src.DragArea&gt;
&lt;TextView
    android:id="@+id/report_view"
    android:text="1 + 1 = 2"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="0"
    android:gravity="center"
    android:padding="10dp"
    style="@android:style/TextAppearance.Large"
    android:textStyle="bold"
    android:shadowColor="#BB000000"
    android:shadowRadius="2.75"
    android:background="@android:drawable/title_bar"
    /&gt;
&lt;/LinearLayout&gt;
</code></pre>
