Giter Site home page Giter Site logo

swipe-deck's People

Contributors

aaronbond avatar bryant1410 avatar gitter-badger avatar shaunkutch avatar shrewduser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swipe-deck's Issues

Size of children

Hello @aaronbond, i liked a lot your library, comparing to other options.

But i'm facing a issue with the size of children inside SwipeDeck. it's because you always measure then using MeasureSpec.EXACTLY with the size of parent minus padding.

I've tried to use wrap_content with SwipeDeck but it don't works, it always measure with the max available size to him.

In my case, i want to use wrap_content in SwipeDeck children, and this approach doesn't works very well.

I'm doing an PR with an possible fix, so you can analyze and merge if you like.

Thanks in advance.

AviarySDK:transformResourcesWithMergeJavaResForRelease

Hey ,

I am stuck with another issue today :(

FAILURE: Build failed with an exception.
Please find the issue :

  • What went wrong:
    Execution failed for task ':AviarySDK:transformResourcesWithMergeJavaResForRelease'.

    com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE.txt
    File1: /home/navya/Documents/Workspace/Trial-set/Trial/AviarySDK/libs/commons-lang3-3.3.2.jar
    File2: /home/navya/Documents/Workspace/Trial-set/Trial/AviarySDK/libs/commons-io-2.4.jar

Do you use any of these jars in Swipe Deck?

CardStack not initializing properly

When you come back from some other activity, though the data passed to adapter is correct, it is not initializing CardStack properly. it shows different item or empty card stack.

How can i get the current visible item from adapter?

Found crash on setSelection(int position)

Hello,

  • During implementing swipe-deck to my application, I had one seniores where I have to move my card to selected position for that I am using below code

    swipeDeck.setSelection(position);

It will give me crash like this :
java.lang.UnsupportedOperationException: Not supported

Reusing of the removed view

Great Library first of all. I have customized it for some data points.
I was trying to reuse the view where the TODO has been written..
@aaronbond Have you tried resolving this TODO..
The view get stuck again if used the removedView as convertview..

Duplicate cards

Hi,
i have noticed the that swipe deck duplicates cards when app loses focus (turn off the screen or leave app and come back again). Then i swipe 3 cards, after that i i see the same 3 cards to swipe again.

Current behaviour:

card was swiped right, position in adapter: -3
card was swiped right, position in adapter: -2
card was swiped right, position in adapter: -1
card was swiped right, position in adapter: 0
card was swiped right, position in adapter: 1
card was swiped right, position in adapter: 2
card was swiped right, position in adapter: 3
card was swiped right, position in adapter: 4
....

Desired behaviour:
card was swiped right, position in adapter: 0
card was swiped right, position in adapter: 1
card was swiped right, position in adapter: 2
card was swiped right, position in adapter: 3
card was swiped right, position in adapter: 4
....

programmatically and gesture swipe up support

Just like Tinder gives swipe up feature for super like . Is it possible to have another method just like swipe left and swipe right?
I still don't understand the use of
cardActionDown() , cardActionUp() methods.

Also while swipe left or right programmatically the transition is very fast how can I delay the transition and show the Like Dislike Image?

Undo Option on Card-Deck

This is only my request can you please add some function to add Undo support .
It will be like when i click on undo it will swap back last card which i have been swapped

Allow adding an overlay view

Pretty much this dribbble.

shot

This similar library provides a Viewpager'stransformPage()kinda callback. I think something like this could accomplish the above gif. Just like a viewpager, as the card is being swiped off, by using the 'swipe distance', we can linearly interpolate an alpha value to apply to an 'overlay view' on top of each card.

I can think of two ways to approach this:

  • This library could take in an optional overlay view and do all this automatically. Super convenient for this specific use case (like in the above gif), but not very flexible.
  • Provide a 'swipe distance callback' and let us do whatever we want with it (like changing the alpha of the overlay on top of the card ourselves). I've only glanced at the implementation but it looks like we could have a callback out of onTouch() in SwipeListener that gives access to the top most card's x and y position (normalized).

*Edit: I think the second way might even provide a broader alternative to the right/left indicator images.

Assuming of course, you like the idea. What do you think?

How to change the card's elevation?

Hi Aaron,

Thanks for your great library.
I'm wondering how to change the card's elevation?
I tried with:

<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
card_view:cardCornerRadius="5dp"
card_view:cardElevation="2dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</android.support.v7.widget.CardView>

but nothing changed. Could you please help?

Thanks

Limit to only swipe left or right, not anywhere around the layout

Hey, great library, I must say. I was wondering though, is it possible to limit the swiping to only go left or right, but not freely around the layout?

In my case here, I have a page where I put this swipedeck at the top and other views (horizontal recyclerview etc) below it. So, swiping around freely isn't going to look nice as it would cut the swiping cards at the edge of another views. Plus, scrolling the page up and down is disturbed by the free swiping mechanism.

Swiping Quickly Freezes Deck

This issue looks like it could be related to issue #7

I mainly see this while swiping cards to the left. If you swipe a second card quickly and it's swipe animation completes just before the first RemoveViewOnAnimCompleted AsyncTask completes. The third card fails to be setup causing there to be no registered touch events. The second card is then not removed and can be seen just off screen to the left. You have to swipe very quickly. It does not happen when calling the swipeTopCardLeft method programmatically.

I feel this may be related to issue #7 as I am also seeing the slight pause before the card is removed. I assume this is due to the AsyncTask. This short pause seems to be the window in which the issue will occur.

cardsDepleted never gets called

Method void cardsDepleted(); is never called, because in method

private void removeTopCard() {
        View child = this.getChildAt(this.getChildCount() - 1);
        if(child != null) {
            child.setOnTouchListener((OnTouchListener)null);
            this.swipeListener = null;
            this.removeViewWaitForAnimation(child);
        }

        if(this.getChildCount() <= 0 && this.eventCallback != null) {
            this.eventCallback.cardsDepleted();
        }

    }

this line this.removeViewWaitForAnimation(child); is executed async but this line

if(this.getChildCount() <= 0 && this.eventCallback != null) {
            this.eventCallback.cardsDepleted();
        }

is executed in main thread, so child is not yet removed and this.getChildCount() returns 1.

CardView is not focusable on below 5.0

I want to switch to next screen when click on the card. But In below 5.0, card is not focusable sometimes. So onClickListener is not calling. In 0.1.0 version, cardClicked() method was available in SwipeEventCallback interface. But In latest version, it is not available. So could you please add the method again.

Just horizontal swipe

Hi. Thanks for the library, it's a good piece of work. I'd like to use it in an app with larger cards, that have a ScrollView as the main layout, so the content can scroll down if needed.

However, when I touch the card, I cannot scroll down, only swipe the card up or down. Is there a simple way to disable swiping up/down?

Thank you

video in place of imageview

i want video to be played inside each card, i am able to achieve this using TextureView to play the Video. and Fortunately it works well,
But results in slower performance. There might be a reason of the views not getting recycled.

programatically swiping card and left

am unable to do swipe card right or left programatically. as you have given some methods like cardStack.swipeTopCardRight() its is having some paramter like duration which is not explained in your example. and i want animation to occur just as when we swipe even though we doi programtically.

Card halts when swiping programmatically

Hey,

When swiping the card programmatically to left, the card halts for around 500 ms before exiting the screen. I'm using 0.2.1 version.
Tested on Moto e 2nd gen, genymotion emulator.

Not happening when swiping the cards manually

Highlight parts of the card when start swiping.

Hi man,

Thanks for the library. It's great and it fits almost all my requirements. There's one thing I can't do.

I have like 2 relative layouts in the bottom of the card with text and image and I would like to highlight (change color) of each of them depending if I'm swiping left or right. Basically similar to what the library already does with the left/right images overlay.

Is there a way to make this work with layouts or maybe another event that I can listen to, to make this works.

Thanks for the help.

Recyclerview container with recyclerview adapter

I have implemented your example and I must say the library is good thanks for the library.
Is it possible to use recyclerview adapter instead of base adapter?
I am making an app similar to tinder in terms of functionality so need to know base adapter will be sufficient?

Add card to top of stack programmatically

Thanks for this wonderful library.I'm trying to add an item to the top of the stack when a user clicks a button. Tried adding the item at index zero nd call notifyDataSetChanged but didn't work.Any help?

How can I make the stack to be flat?

Is there an option to make a stack of say 10 cards (I'm using RelativeLayout as the main element for the card, so it doesn't have a shadow) flat without shadow at all?

Using Swipe Deck inside NestedScrollview is creating issues

This library is really helpful, easing up the work to the great extend!!

I found one Issue, When i am using the NestedScrollView as a Parent Layout and pass the fragment of SwipeDeck. It causing problem in animating.

  1. It doesnt smoothy goes off on Left/Right on single swipe. Card Stucks and needs multiple swipe to swipe it off.
  2. If it drag to some extend than double clicking will swipe off the Card.
  3. I have disable the click of Parent also tired with setting the nestedscrollviewenabled = false.

Can anyone help me in resolving the Issue. @aaronbond

Thanks.

Swipe all items

Can not swipe all cards , always there are 2 cards , i can not swipe them ??

Respect min and max Width and Height

It seems that even if I mention the mention the layout_width and layout_width as wrap_content then mention the min and max width and height, it doesn't seem to respect the value.

Swipe in ViewPager

Hi,
i'm using swipe cards in view pager, but card swiping conflicts with tab swiping. Do you know a way how to lock tab swiping if card is being swiped?

Padding issues on smaller screens

Hey man,

I'm having some issues with this on smaller screens and I think it's because of the padding issue. Why can not I use wrap_content in the swipeframelayout and swipedeck?

If I set this the cards automatically takes full screen and then i have to set padding to make them fit in the right place. This obviously does not work the same way in every screen.

Do you know a way to fix this?

Issues with below lollipop version

I have used this library for my project. I have an issues with it. It is working fine , when running the app in and above 5.0 (lollipop). But it is not, below 5.0

The first card is placed at last. I mean card stack is reversed. When swiping the card, the last items only dragged. FYI, I have added screenshot below. Sorry for my poor English.

screenshot_2016-01-11-13-38-12

RecyclerAdapter support

Is it just me or you support Adapter class only without the possibility to add recycler adapter with the cardstack?

Programmatically swipe cards?

You have done a great job!
is it possible to swipe the top card programmatically, the way its possible in tinder, i.e. with on click events of buttons.

Crash when opening a new activity on clicking a card and returning back.

Hi Aaron.

Thanks for providing this great library. I am currently facing an issue.
When I click on a card, I launch another activity.
But when I press back button and then swipe the card, it crashes.
The crash is because the callback of OnSwipeLeft/Right returns a negative position value and I need to access the data in the array at that position.
Also the array size increases.

Is there a way to make it work.
Thanks for the help.

onTouch event issue while using within Recycler view

I'm using the SwipeDeck card view inside recycler view. The issue I'm facing is that the onTouch events are first consumed by recycler view(parent) and then its child view(i.e SwipeDeck), so its not swiping as smoothly as it should.

Plz help me out!!!

Cannot swipe the second to last card.

Hey man,

First I would like to compliment you on how you strucuted the code really well. But I seem to find the issue to your bug.

I swipe through all the cards fine, but when I get to the second to last card. I cannot swipe it.

In order for me to swipe the second to last card, I have to press the "add cards" button. To add more cards. Then I can swipe cards again UNTIL (again) I reach the second to last card.

So no matter what, I cannot swipe the second to last card. How can I fix this error and where in the code is the problem located?

Cheers~

Additional SwipeEventCallback methods

Is it possible to to expand the SwipeEventCallbacks with two more callback methods to detect

  1. the top-card is touched and being moved
  2. the top-card is not longer touched

Those callbacks would help to find out if e.g. a viewpager should intercept touch events or not.

Thanks for your great work!

Cyclic looping through cards

Hi Aaron ,
First I would like to thank you for this great library. I would like to use it in my project. I was wondering if there is a way to enable cyclic looping through the cards on swipe/up/down, instead of removing it?

Crash on programatically removing all cards on a button click.

I need to programatically remove all the cards on the click of a button.
feedList is my dataset array. I am doing the following:

feedList.clear();
adapter.notifyDataSetChanged();/

Behavior: The cards become blank but they still remain on the screen and the app crashes.
Please help. Thanks.

Could not find frankiesardo:icepick:3.1.0.

Please let me know how to solve the following issue. The frankiesardo:icepick is not found.

Error:A problem occurred configuring project ':Trial'.

Could not resolve all dependencies for configuration ':Trial:_debugCompile'.
Could not find frankiesardo:icepick:3.1.0.
Searched in the following locations:
https://jcenter.bintray.com/frankiesardo/icepick/3.1.0/icepick-3.1.0.pom
https://jcenter.bintray.com/frankiesardo/icepick/3.1.0/icepick-3.1.0.jar
file:/home/navya/Documents/adt-bundle-linux-x86_64-20140702/sdk/extras/android/m2repository/frankiesardo/icepick/3.1.0/icepick-3.1.0.pom
file:/home/navya/Documents/adt-bundle-linux-x86_64-20140702/sdk/extras/android/m2repository/frankiesardo/icepick/3.1.0/icepick-3.1.0.jar
file:/home/navya/Documents/adt-bundle-linux-x86_64-20140702/sdk/extras/google/m2repository/frankiesardo/icepick/3.1.0/icepick-3.1.0.pom
file:/home/navya/Documents/adt-bundle-linux-x86_64-20140702/sdk/extras/google/m2repository/frankiesardo/icepick/3.1.0/icepick-3.1.0.jar
Required by:
Trial:Trial:unspecified > com.daprlabs.aaron:Swipe-Deck:0.2.9

Select Particular index on click

So I have a list of profiles in an Array List and I want the user to be able to start swiping from anywhere in the list. is there a method for initialising this approach or another event like cardStart or cardEnd?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.