Commit Graph

68 Commits

Author SHA1 Message Date
linfaxin 79bb4ecb36 Refactor. Stronger and easier. 2015-03-22 11:14:54 +08:00
linfaxin b460d4dd47 Optimize the implement when surface or bottom not a GroupView 2015-03-21 22:39:41 +08:00
linfaxin 8fea955083 Improve the release drag logic. 2015-03-19 20:26:34 +08:00
linfaxin 8412d50131 Support clickToClose attr, if set to true, the opened swipeLayout will auto close when click on it's surface view 2015-03-19 11:36:29 +08:00
linfaxin 6e909b0343 The bottom and surface views needn't be ViewGroup.
The bottom view can use layout_gravity to indicate the swiping direction
2015-03-17 18:33:37 +08:00
linfaxin 8e89db06b0 Handle the itemClick and the itemLongClick only when the SwipeLayout is the root of AdapterView's item, 2015-03-16 10:33:18 +08:00
linfaxin 742494d085 improve touch handle and intercept logic :
1.The surface and bottom view could be clickable and longClickable, and it's selector drawables works fine;
2.The swipeLayout can wrap in other gestural layout, the swipe and other layout's gesture work's pretty;
2015-03-15 20:53:54 +08:00
HarshEvilGeek 5ced46bb56 adding a constant for empty layout ids 2015-02-12 16:49:22 +05:30
HarshEvilGeek 93c06bfa01 demo to show that three edge swipe works 2015-02-12 16:02:19 +05:30
HarshEvilGeek 1fd2ec7d2f Recylcing typed array and adding support for opening specific drag edge 2015-02-12 11:41:08 +05:30
daimajia e8f4ec1c98 remove useless files 2015-02-11 23:17:19 +08:00
HarshEvilGeek c841ba57e4 Adding support for enabling and disabling particular swipe edges. One bug fix from merge 2015-02-11 18:25:31 +05:30
HarshEvilGeek ea5a0156dc fixing bug from horizontal swipe offset and adding preliminary code to restrict particular drag edges 2015-02-11 17:53:10 +05:30
HarshEvilGeek ee02941dd8 merging 2015-02-11 15:07:33 +05:30
HarshEvilGeek f8350fce20 adding support for the user to pass the ids of bottom views 2015-02-11 14:51:05 +05:30
HarshEvilGeek 6fcf27d4ce fixing touchslop changes 2015-02-11 13:53:56 +05:30
daimajia da7084cc8b merge from @jpselley, start support RecyclerView. 2015-01-31 18:31:21 +08:00
John Shelley baafdcbb95 Modularize Manager class
Seperated out the code thats used more then once and created 2 seperate subclasses called Adapter and Recycler based on the method of 'lists'.
2015-01-31 01:06:43 -06:00
John Shelley 418898c33c Setup Clicks, Deletion, Animation
Removed 2-way-view in favor of more simplistic items. Based on research most people have used the ViewHolder for onItemClick listener support, sometimes I've seen a ViewHolder implement View.OnClickListener, however that didn't work for our example so our root view has an itemclicklistener set.

On top of that, basic animations were added via a top starred github library.

The delete is hooked up to actually remove the item from the list. However it seems glitchy in comparison.

It should be noted that it will be left up to the user to determine UI/UX aspects such as removal. The Inbox App by Google uses a swipe to remove items, where the Gmail App by Google uses a swipe to 'queue' an item for dismisal, but not dismissing it until the user makes another interaction such as scrolling or clicking another email.

A 'closeAllItems()' method was added in our Managers, as well as a minor fix that was needed by adding 'shown layouts' correctly in our SwipeListener.
2015-01-30 23:49:25 -06:00
daimajia a92a2cdae7 try to fix #74 2015-01-24 10:22:39 +08:00
daimajia a9cc7d28eb support compile under build:gradle:1.0.0 2015-01-24 09:09:23 +08:00
noinnion df48a3c387 add touchSlop for swiping 2014-12-26 10:16:07 +01:00
HarshEvilGeek 7da3056130 Formatting 2014-12-24 12:36:07 +05:30
HarshEvilGeek 046caa4a10 Fixing default direction 2014-12-23 14:53:44 +05:30
unknown c5d3e6743e fixed bug with layout not moving on swipe 2014-12-23 10:19:01 +05:30
unknown 71ef2ad7e8 Enabling both side swipe 2014-12-22 17:48:51 +05:30
John Shelley 1f75c11e6a (recyclerview.adapter) Update adapter. See details ->
RecyclerViewAdapter in the demo now extends from RecyclerSwipeAdapter from the library. This greatly simplifies things for the users. They still must implement their own ViewHolder and extend from the abstract one inside the SwipeAdapter. See the demo for recyclerview for a better understanding of how it works.

Also increased the build and compile versions to 21. Added elevation to the top view for 5.0 devices. See the recyclerview on a device running android 5.0+ to see the difference from the edge.
This can be replicated with a shadow drawable gradient with lower devices. Maybe someone else can add this feature.
2014-12-19 10:32:59 -06:00
John Shelley a5a2e2c9ea (recyclerview, adapter) Initial RecyclerView update.. see details
Added more basic functionaloty to the recycler view activity and more improvements
2014-12-18 16:52:53 -06:00
John Shelley bd4749188c (demo, recyclerview) Update demo.. see details ->
Demo now includes the most simple form or using a recycler view in the codebase currently.
Next step would be to create a more simplified approach at a RecyclerViewSwipeAdapter that a user can extend from and only implement smaller methods instead of all the implementations.
2014-12-18 14:53:53 -06:00
John Shelley 25e38f34f3 (gradle) Update gradle issues..
Updating gradle specfic issues that arrised when using Android Studio 1.0.+
2014-12-18 10:58:50 -06:00
Rahul Raja 5ec9935ca2 Merge branch 'master' of https://github.com/rahulrj/AndroidSwipeLayout 2014-12-16 17:57:31 +05:30
Rahul Raja f957a49cd2 Solved one NullPointerException 2014-12-16 17:56:54 +05:30
RAHUL RAJA ce1eb70c86 Update SwipeLayout.java
Changed Variable names
2014-12-12 23:04:15 +05:30
Rahul Raja dee951d85d Added horizontal and vertical offset for swiping 2014-12-12 16:44:48 +05:30
daimajia fd22147ea3 fix #35, v1.1.7 2014-09-27 07:29:24 +08:00
daimajia e0b54dede3 support double click 2014-09-22 10:51:33 +08:00
daimajia 0b485a1e35 add swipe adapter utils 2014-09-19 22:56:14 +08:00
daimajia 677c318ab9 add Swipe Adapter utils 2014-09-19 22:55:20 +08:00
daimajia c3c583090f fix single mode not close bug 2014-09-17 23:12:58 +08:00
daimajia 9e965d7c38 a simpler and better way to mange open items 2014-09-17 14:18:30 +08:00
daimajia 7db7da3f58 a better auto-close SwipeAdapter(sigle item mode) 2014-09-17 12:10:31 +08:00
daimajia 7ba5e8b350 better selector effect 2014-09-16 09:44:30 +08:00
daimajia 6c3db3425c fix #24, support disable swipe gesture and fix setEnabled(boolean) not works issue 2014-09-12 10:00:00 +08:00
daimajia 34e2389773 fix #19 2014-09-11 19:36:15 +08:00
daimajia f6cd43ed82 fix no response bug 2014-09-11 17:22:46 +08:00
daimajia 0d3dc52c90 #23 support selector 2014-09-11 16:44:29 +08:00
daimajia 34e203930c clear comment 2014-09-02 20:18:07 +08:00
daimajia 171898e2e3 remove method 2014-09-02 20:16:09 +08:00
daimajia 4dfe98e207 small fix 2014-09-02 09:01:05 +08:00
daimajia 93793031ce fix #9, change to screen coordinates 2014-09-02 08:14:34 +08:00