All Projects → intuit → Truffle Shuffle

intuit / Truffle Shuffle

Licence: apache-2.0
An Android data-driven, percentage-based UI Card Gallery Library

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Truffle Shuffle

Cordova Plugin Inappbrowser
Apache Cordova Plugin inappbrowser
Stars: ✭ 994 (+749.57%)
Mutual labels:  library, mobile
Cordova Mobile Spec
Apache Cordova mobile-spec
Stars: ✭ 57 (-51.28%)
Mutual labels:  library, mobile
Cordova Firefoxos
[DEPRECATED] Apache Cordova firefoxos
Stars: ✭ 41 (-64.96%)
Mutual labels:  library, mobile
Cardviewlist
An elegant and responsive CardView like Android on iOS with Swift. Available horizontal and vertical scrolling with full animations and customizable.
Stars: ✭ 30 (-74.36%)
Mutual labels:  library, android-ui
Livechart
Android library to draw beautiful and rich line charts.
Stars: ✭ 78 (-33.33%)
Mutual labels:  mobile, data-visualization
Fillingbutton
🔥Replace typical onLongClickListener with this library!
Stars: ✭ 31 (-73.5%)
Mutual labels:  library, android-ui
Cordova App Harness
[DEPRECATED] Apache Cordova app harness
Stars: ✭ 49 (-58.12%)
Mutual labels:  library, mobile
Xtoolkit.whitelabel
Modular MVVM framework for fast creating powerful cross-platform applications with Xamarin.
Stars: ✭ 22 (-81.2%)
Mutual labels:  library, mobile
Cordova Plugin Test Framework
Apache Cordova
Stars: ✭ 66 (-43.59%)
Mutual labels:  library, mobile
Bubbles
⚡️A library for adding messenger style floating bubbles to any android application 📲
Stars: ✭ 66 (-43.59%)
Mutual labels:  library, android-ui
Cordova Plugin Camera
Apache Cordova Plugin camera
Stars: ✭ 879 (+651.28%)
Mutual labels:  library, mobile
Bubble Navigation
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+1213.68%)
Mutual labels:  library, android-ui
Cordova Cli
Apache Cordova CLI
Stars: ✭ 861 (+635.9%)
Mutual labels:  library, mobile
F2
📱📈An elegant, interactive and flexible charting library for mobile.
Stars: ✭ 7,619 (+6411.97%)
Mutual labels:  mobile, data-visualization
Similarloadingview
A stylish loading view for Android
Stars: ✭ 26 (-77.78%)
Mutual labels:  library, android-ui
Tagsedittext
Android TagsEditText View
Stars: ✭ 47 (-59.83%)
Mutual labels:  library, android-ui
Swipeablecard
A simple implementation of swipe card like StreetView
Stars: ✭ 812 (+594.02%)
Mutual labels:  library, android-ui
Realm Core
Core database component for the Realm Mobile Database SDKs
Stars: ✭ 836 (+614.53%)
Mutual labels:  library, mobile
Cordova Plugin Device Motion
Apache Cordova Plugin device-motion
Stars: ✭ 58 (-50.43%)
Mutual labels:  library, mobile
Boden
Purely native C++ cross-platform GUI framework for Android and iOS development. https://www.boden.io
Stars: ✭ 1,394 (+1091.45%)
Mutual labels:  mobile, android-ui

All Contributors

Truffle Shuffle is an Android UI component card gallery library with a fun animation. The gallery is easily customizable and is data driven based on the number of objects in an array and the content inside of those objects. The card gallery uses a custom-made Android ViewGroup with custom view attributes to specify the size of the individual cards as a percentage of the ViewGroup's size. This card gallery is used on TurboTax's mobile app in the product lineup. Truffle Shuffle is written 100% in Kotlin!

TurboTax cards Text content video Text content with margins video Text content with 3 cards video Text content with titles video

Quick Start

To run the example project, clone the repo and run the Android application through Android Studio on an Emulator. You can play with the example by

  • Changing the layout inside of the cards in app/src/main/res/layout/card_layout.xml
  • Changing the number of cards in the array in getCardDetails() in app/src/main/kotlin/com/intuit/truffle/shuffle/MainActivity.kt
  • Changing the percentages of the view group in app/src/main/res/values/card_view_group_percentages.xml

To contribute to this project, make sure that the code committed matches this project's formatting standards.

To reformat or check that committed code is compliant, follow one of the following options:

Use Gradle tasks (recommended - ktlint docs):

  • ./gradlew ktlint

    Use this command to check the formatting rules are covered

  • /gradlew ktlintFormat

    Use this command to re-format code that is not compliant with this project's formatting rules.

Use ktlint engine (ktlint docs):

  • ktlint

    Use this command to check the formatting rules are covered

  • ktlint "src/**/*.kt" "!src/**/*Test.kt"

    Check only certain locations (prepend ! to negate the pattern)

  • ktlint -F

    Use this command to re-format code that is not compliant with this project's formatting rules. (if some errors cannot be fixed automatically they will be printed to stderr)

  • ktlint -F "src/**/*.kt"

    Use this command to re-format certain locations (prepend ! to negate the pattern) . (if some errors cannot be fixed automatically they will be printed to stderr)

  • ktlint --install-git-pre-commit-hook

    Install git hook to automatically check files for style violations on commit.

Using Truffle Shuffle

To add this to your own Android application, complete the following steps:

  1. Add the dependency to your project's build.gradle file under dependencies:
dependencies {
    implementation 'com.intuit.truffleshuffle:truffleshuffle:1.0.0'
}

And make sure jcenter() is added to your app build.gradle

repositories {
    jcenter()
}
  1. Add the com.intuit.truffleshuffle.CardViewGroup to the xml file where you want the card gallery, like in app/src/main/res/layout/activity_main.xml
    • add the percentages you want to the custom attributes of the CardViewGroup in the xml file
      • custom:dashboardCardHeightPercentage, custom:widthPercentage, custom:topSpacingPercentage, custom:bottomSpacingPercentage
  2. Add an xml layout (card_layout.xml) for the contents of your cards similar to app/src/main/res/layout/card_layout.xml
  3. Create a folder cardGallery with 2 files:
    • CardContent similar to app/src/main/kotlin/com/intuit/truffle/shuffle/cardGallery/CardContent.kt
      • This is your data object for the card contents
    • CustomizeAdapter similar to app/src/main/kotlin/com/intuit/truffle/shuffle/cardGallery/CustomizeAdapter.kt
      • The constructor should take an ArrayList and should extend CardContentAdapter
      • Override the getViewContent() function to set the data content in the cardContent to the views in your card_layout.xml, ie. setting the text in a textView
  4. In the Activity where you'll be using this UI component:
    • Instantiate a CustomizeAdapter you just defined and pass in an arrayList of CardContents and the resource id of inside the card ie. R.layout.card_layout
    • Call setupAdapter() on the CustomizeAdapter you just created with the CardViewGroup using findViewById()
  5. Now the TruffleShuffle UI component is ready to use!

Communication and Contribution

  • If you need help, open an issue and tag as help wanted.
  • If you found a bug, open an issue and tag as bug.
  • If you have a feature request, open an issue and tag as feature.
  • If you want to contribute, please refer to the Contributing documentation and submit a pull request.
    • In order to submit a pull request, please fork this repo and submit a PR from your forked repo.
    • Have a detailed message as to what your PR fixes/enhances/adds.
    • Each PR must get an approval before we will merge.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Katie Levy

💻

Rocio Montes

📖

monicamiyasato

📖

cfsnsalazar

💻

MathiasX1

💻

Anthony Baer

📖

Alec Dilanchian

💻

Angela Hwang

💻

henry398

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].