23  December
52

CardsUI

Google’s Now popular Cards UI has everyone fascinated.

Now a library I created mimicking that behaviour is available.

The view might still be a little flaky, and the View’s code is not well documented, but the example really shows you how simple it all is.

Layout XML:

Activity Class:

You can download the example APK.

or Clone the lib from Bitbucket or Github

Clone from Bitbucket

Download from GitHub

 

Some Awesome Forks:

 

https://github.com/Androguide/cardsui-for-android

 

52 comments on “CardsUI”

  1. hans stam Reply

    I need this view now, any way i can get it soon?

  2. bqy Reply

    nice!

  3. driodek Reply

    Any chance to know when this library will be available?

  4. jophde Reply

    I was wondering if this is on Github? I would love to contribute.

    • Nadav Fima Reply

      Hi,
      The library is now available on Bitbucket.
      Enjoy!

      • ingyesid

        in android < 4.0 the view not work !

  5. snodnipper Reply

    Really looking forward to this :)

  6. Akhil Indurti Reply

    I am also looking forward to this! :D

  7. Vitaliy Reply

    Any news about this library ?

  8. Karey Powell Reply

    Please let me know when this library is ready … :)

  9. HandlerExploit Reply

    Can this be removed and only re-added when it is actually real? It smells of vaporware.

  10. Nadav Fima Reply

    Not vaporware mate,
    The library is now available on Bitbucket.
    Enjoy!

  11. Sleepy Panda Labs (@SleepyPandaLabs) Reply

    Thanks Nadav! Exactly what I was waiting for my redesigns!

  12. Eric Reply

    Thanks for the library! Testing it out myself, I found swiping a card away only brings it back

    • Akhil Indurti Reply

      make sure setSwipeable is true meaning you don’t setSwipeable(false)

      • Eric

        Yeah, I set it to true. I can swipe it away, but it reappears right away

    • Nadav Fima Reply

      Will be fixed in a few minutes

  13. CVE Reply

    Awesome!

    I have tried the example on 4.0 devices and everything is fine, but on 2.x devices, the card stacks are only shown as a single card (the last one of the stack)

    Is there a workaround, or am I doing something wrong?

  14. Nadav Fima Reply

    Sounds like on 2.x devices, the top margin isn’t considered at all.
    I’ll try to fix it later.

  15. Jeff Reply

    What kind of content can be added to the card view, Is it txt only? I just loaded the example apk I really didn’t look at the code

    • Nadav Fima Reply

      You can inflate it with any Layout XML.

  16. Sean Fair Reply

    Why don’t you use a feagment that implements a broadcast receiver? Or a similar pattern why so much extra work the cards don’t appear to be much more than that.

  17. kpbird Reply

    Awesome…

    Thank You.

  18. telik Reply

    I’m trying to use this in an app that utilizes fragments. I can inflate the layout like the example, but when I attempt to add cards to the CardUI, nothing actually shows up (even after calling refresh()).
    Any tips/pointers on how to appropriately use this in such a capacity? Seems like a really cool library!

    Thanks so much for sharing! :)

  19. Aman Alam Reply

    Exactly what I have been looking for.
    Would be checking compatibility on 2.x devices.
    Thanks a ton!

  20. Mohd Irteza Reply

    Really helpful library. Thank you so much for doing this! :) Loved using it. Will definitely be using it in my app.

  21. Patrick Reply

    Nice work! It would be nice to see a tablet layout, similar to Google+ layout.

  22. Kit Reply

    When I use a EditText in CardUI, the input content will not be saved.
    What can i do?

  23. Louis Reply

    I’m trying to change the cards theme to dark Holo, but no success so far, I’ve tried everything from modifying styles.xml/colors.xml to inverting the drawables colors, but no go, nothing even slightly changes.
    Could somebody please point me to the right direction ?

  24. WeNeigh Reply

    Does anyone know how I can reduce the margin between cards?
    I’ve been fiddling with the dimension values in item_card.xml and item_card_empty.xml, but they don’t seem to be doing anything!

  25. Kevin Hill Reply

    This needs better documentation. Other than that, it’s awesome!!

  26. Vinicius Alexandre Reply

    I’ve been trying to use an editText in a card, but when I touch the editText, it doesn’t get focus. Actually, it gets focus and right after it, lost the focus.

    Is this a known issue?

  27. Derric Reply

    The example shows how to set the onclick for each card statically, but how would you do that based on the index/position of the card??

  28. Josh Reply

    Anyone know how to keep the views from recycling? I load data to cards, but every time I scroll away and back it forces the cards to reload their data.

    • Josh Reply

      It appears that inside the Card itself, getCardContent is called each time it is scrolled to, thus the reloading.

  29. UST Reply

    can i say something 中文

    • Chinese Reply

      yes you can , i could understand you

  30. Chinese Reply

    I don’t know how ? i use it to my program instead of the traditional listview style.

  31. David1111 Reply

    How can I add a share button to the top of the cards. I’ve implemented it in the xml with an on click method, but the app crashes when I press it and says that the method doesn’t exist.

  32. jychan Reply

    can anyone tell me how to use this library ?

  33. Donnie Emanuel Reply

    Thank you.

Leave a comment

Please wait...