From b86d8be9b8915563e164f5d2e388a33613553a7f Mon Sep 17 00:00:00 2001 From: Florens Douwes Date: Thu, 1 May 2014 20:09:47 +0200 Subject: [PATCH] Refactored the BoardEditor. Proper moving of the items --- Chan/assets/html/licences.html | 49 +- Chan/res/layout/board_edit.xml | 6 - Chan/res/layout/board_edit_item.xml | 26 + Chan/res/layout/board_view.xml | 28 - Chan/res/values/strings.xml | 2 +- .../android/dslv/DragSortController.java | 469 +++ .../android/dslv/DragSortCursorAdapter.java | 239 ++ .../mobeta/android/dslv/DragSortItemView.java | 92 + .../dslv/DragSortItemViewCheckable.java | 46 + .../mobeta/android/dslv/DragSortListView.java | 2974 +++++++++++++++++ .../dslv/ResourceDragSortCursorAdapter.java | 155 + .../dslv/SimpleDragSortCursorAdapter.java | 448 +++ .../android/dslv/SimpleFloatViewManager.java | 87 + .../chan/core/manager/BoardManager.java | 10 - .../floens/chan/database/DatabaseManager.java | 1 + .../ui/SwipeDismissListViewTouchListener.java | 16 +- .../floens/chan/ui/activity/BaseActivity.java | 4 +- .../floens/chan/ui/activity/BoardEditor.java | 194 +- .../chan/ui/adapter/BoardEditAdapter.java | 84 - .../org/floens/chan/ui/view/DragGripView.java | 117 + .../floens/chan/ui/view/DynamicListView.java | 596 ---- 21 files changed, 4856 insertions(+), 787 deletions(-) delete mode 100644 Chan/res/layout/board_edit.xml create mode 100644 Chan/res/layout/board_edit_item.xml delete mode 100644 Chan/res/layout/board_view.xml create mode 100644 Chan/src/com/mobeta/android/dslv/DragSortController.java create mode 100644 Chan/src/com/mobeta/android/dslv/DragSortCursorAdapter.java create mode 100644 Chan/src/com/mobeta/android/dslv/DragSortItemView.java create mode 100644 Chan/src/com/mobeta/android/dslv/DragSortItemViewCheckable.java create mode 100644 Chan/src/com/mobeta/android/dslv/DragSortListView.java create mode 100644 Chan/src/com/mobeta/android/dslv/ResourceDragSortCursorAdapter.java create mode 100644 Chan/src/com/mobeta/android/dslv/SimpleDragSortCursorAdapter.java create mode 100644 Chan/src/com/mobeta/android/dslv/SimpleFloatViewManager.java delete mode 100644 Chan/src/org/floens/chan/ui/adapter/BoardEditAdapter.java create mode 100644 Chan/src/org/floens/chan/ui/view/DragGripView.java delete mode 100644 Chan/src/org/floens/chan/ui/view/DynamicListView.java diff --git a/Chan/assets/html/licences.html b/Chan/assets/html/licences.html index 8e83ea1e..98e5ea2d 100644 --- a/Chan/assets/html/licences.html +++ b/Chan/assets/html/licences.html @@ -58,7 +58,7 @@ limitations under the License.
-

jsoup License

+

Jsoup

         
 The jsoup code-base (include source and compiled packages) are distributed under the open source MIT license as described below.
@@ -95,6 +95,51 @@ limitations under the License.
         
     

+ +

This software includes several Android classes from DashClock

+ https://code.google.com/p/dashclock/ +
+        
+Copyright 2013 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+        
+    
+
+ +

DragSortListView

+ https://github.com/bauerca/drag-sort-listview +
+        
+A subclass of the Android ListView component that enables drag
+and drop re-ordering of list items.
+
+Copyright 2012 Carl Bauer
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+        
+    
+
+ - diff --git a/Chan/res/layout/board_edit.xml b/Chan/res/layout/board_edit.xml deleted file mode 100644 index 1ce030bf..00000000 --- a/Chan/res/layout/board_edit.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/Chan/res/layout/board_edit_item.xml b/Chan/res/layout/board_edit_item.xml new file mode 100644 index 00000000..85195b12 --- /dev/null +++ b/Chan/res/layout/board_edit_item.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/Chan/res/layout/board_view.xml b/Chan/res/layout/board_view.xml deleted file mode 100644 index 572d8caf..00000000 --- a/Chan/res/layout/board_view.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - -