Tuesday, 2 April 2019

Drag and Drop between two ListViews with images and backward compatibility

I'm searching the way I can do Drag and Drop between two ListViews with images and backward compatibility.

Example:

http://i.imgur.com/DVBdlcc.png

Layout:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical"
   android:layout_width="match_parent"
   android:layout_height="match_parent">

    <LinearLayout
       android:orientation="horizontal"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:splitMotionEvents="true">
        <TextView
           android:layout_width="0dip"
           android:layout_height="match_parent"
           android:text="list 1"
           android:layout_weight="1"
           android:textSize="25sp"
           android:gravity="center" />
        <TextView
           android:layout_width="0dip"
           android:layout_height="match_parent"
           android:text="list 2"
           android:layout_weight="1"
           android:textSize="25sp"
           android:gravity="center" />
    </LinearLayout>

    <LinearLayout
       android:orientation="horizontal"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:splitMotionEvents="true">
        <ListView android:id="@+id/list1"
           android:layout_width="0dip"
           android:layout_height="match_parent"
           android:layout_weight="1"
           android:paddingBottom="0sp"/>
        <ListView android:id="@+id/list2"
           android:layout_width="0dip"
           android:layout_height="match_parent"
           android:layout_weight="1" />
    </LinearLayout>
</LinearLayout>



from Drag and Drop between two ListViews with images and backward compatibility

No comments:

Post a Comment