This repository has been archived by the owner on Feb 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/v1.2: (46 commits) Updated read me and commit latest APK Changed instance creation for actiondialog Bumped version Removed memory cache size Remove html Don't reset view twice Fixed issue with images not being deleted properly Added share functionality Added delete option functionality Added selection Added menu Added basic action mode for long press images Added notes into action adapter Fixed population issue Populate model on save Added notes input box Fixed issue with adding new plant messing up order Added snack bar for feeding Fixed formatting inconsistencies Tone back the colours ...
- Loading branch information
Showing
37 changed files
with
1,558 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
app/src/main/java/me/anon/controller/adapter/ItemTouchHelperAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package me.anon.controller.adapter; | ||
|
||
public interface ItemTouchHelperAdapter | ||
{ | ||
void onItemMove(int fromPosition, int toPosition); | ||
|
||
void onItemDismiss(int position); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
app/src/main/java/me/anon/controller/adapter/SimpleItemTouchHelperCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package me.anon.controller.adapter; | ||
|
||
import android.support.v7.widget.RecyclerView; | ||
import android.support.v7.widget.helper.ItemTouchHelper; | ||
|
||
public class SimpleItemTouchHelperCallback extends ItemTouchHelper.Callback | ||
{ | ||
private final ItemTouchHelperAdapter mAdapter; | ||
|
||
public SimpleItemTouchHelperCallback(ItemTouchHelperAdapter adapter) | ||
{ | ||
mAdapter = adapter; | ||
} | ||
|
||
@Override public boolean isLongPressDragEnabled() | ||
{ | ||
return true; | ||
} | ||
|
||
@Override public boolean isItemViewSwipeEnabled() | ||
{ | ||
return false; | ||
} | ||
|
||
@Override public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) | ||
{ | ||
int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; | ||
int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; | ||
return makeMovementFlags(dragFlags, swipeFlags); | ||
} | ||
|
||
@Override public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) | ||
{ | ||
mAdapter.onItemMove(viewHolder.getAdapterPosition(), target.getAdapterPosition()); | ||
return true; | ||
} | ||
|
||
@Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) | ||
{ | ||
mAdapter.onItemDismiss(viewHolder.getAdapterPosition()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.