diff --git a/project.properties b/project.properties
index 695b950..04798d9 100644
--- a/project.properties
+++ b/project.properties
@@ -13,3 +13,4 @@ android.library.reference.1=../ActionBarSherlock/library
android.library.reference.2=../HoloEverywhere/library
android.library.reference.3=../NineOldAndroids/library
android.library.reference.4=../android-numberpicker/library
+android.library.reference.5=../drag-sort-listview/library
diff --git a/res/drawable-hdpi/drag_handle.png b/res/drawable-hdpi/drag_handle.png
new file mode 100755
index 0000000..9b25548
Binary files /dev/null and b/res/drawable-hdpi/drag_handle.png differ
diff --git a/res/drawable-mdpi/drag_handle.png b/res/drawable-mdpi/drag_handle.png
new file mode 100755
index 0000000..b85828d
Binary files /dev/null and b/res/drawable-mdpi/drag_handle.png differ
diff --git a/res/drawable-xhdpi/drag_handle.png b/res/drawable-xhdpi/drag_handle.png
new file mode 100755
index 0000000..6a3450e
Binary files /dev/null and b/res/drawable-xhdpi/drag_handle.png differ
diff --git a/res/layout/favorite_listing.xml b/res/layout/favorite_listing.xml
index fe0e94e..5230a96 100644
--- a/res/layout/favorite_listing.xml
+++ b/res/layout/favorite_listing.xml
@@ -6,6 +6,15 @@
android:paddingLeft="5dp"
android:paddingRight="5dp" >
+
+
diff --git a/res/layout/main.xml b/res/layout/main.xml
index b520d0b..aa2918c 100644
--- a/res/layout/main.xml
+++ b/res/layout/main.xml
@@ -1,15 +1,28 @@
-
+ android:layout_margin="3dp"
+ android:layout_weight="1"
+ android:dividerHeight="1dp"
+ android:padding="3dp"
+ app:collapsed_height="1dp"
+ app:drag_enabled="true"
+ app:drag_handle_id="@id/dragHandle"
+ app:drag_scroll_start="0.33"
+ app:drag_start_mode="onDown"
+ app:float_alpha="0.6"
+ app:remove_enabled="true"
+ app:remove_mode="flingRemove"
+ app:slide_shuffle_speed="0.3" />
{
}
}
+ public void move(StationPair object, int to) {
+ super.remove(object);
+ super.insert(object, to);
+ }
+
@Override
public void clear() {
super.clear();
diff --git a/src/com/dougkeen/bart/model/StationPair.java b/src/com/dougkeen/bart/model/StationPair.java
index c1fcd79..d927be7 100644
--- a/src/com/dougkeen/bart/model/StationPair.java
+++ b/src/com/dougkeen/bart/model/StationPair.java
@@ -43,6 +43,7 @@ public class StationPair implements Parcelable {
private Station origin;
private Station destination;
private String fare;
+
private long fareLastUpdated;
private int averageTripLength;
private int averageTripSampleCount;
@@ -126,6 +127,12 @@ public class StationPair implements Parcelable {
return true;
}
+ @Override
+ public String toString() {
+ return "StationPair [origin=" + origin + ", destination=" + destination
+ + "]";
+ }
+
@Override
public int describeContents() {
return 0;