Giter Site home page Giter Site logo

shivasurya / feedbackdialog Goto Github PK

View Code? Open in Web Editor NEW
100.0 5.0 20.0 320 KB

An Interactive Feedback Dialog for Android inspired from Google Maps Review section

License: Apache License 2.0

Java 100.00%
feedback-loop android-library android-material material-design android-ui android-ui-insipired

feedbackdialog's Introduction

Feedback Dialog for Android

Download License

An Interactive Feedback Dialog for Android inspired from Google Maps Review section

It's very important to have a feedback loop, where you're constantly thinking about what you've done and how you could be doing it better. - Elon Musk

Getting feedback from your customers, prospects is the most important task for developing and moving a product. Getting inspired from Google Maps Review section, I've compiled and crafted this library to make sure this utility will be helpful to get feedback from customers easily without any monotonous forms fillup and with less input.

Few usecases

Install dependency

compile 'design.ivisionblog.apps:feedback-dialog:0.0.1-alpha'

Getting Started

As simple as AlertDialog API,

          FeedBackDialog mDialog = new FeedBackDialog(MainActivity.this)
                .setBackgroundColor(R.color.bgcolor)
                .setIcon(R.drawable.brand_icon)
                .setIconColor(R.color.brand_color)
                .setTitle(R.string.brand_name)
                .setDescription(R.string.brand_description)
                .setReviewQuestion(R.string.customer_review_question)
                .setPositiveFeedbackText(R.string.positive_feedback_text)
                .setNegativeFeedbackText(R.string.negative_feedback_text)
                .setAmbiguityFeedbackText(R.string.ambiguity_feedback_text)
                .setOnReviewClickListener(new FeedBackActionsListeners() {
                    @Override
                    public void onPositiveFeedback(FeedBackDialog dialog) {
                        Log.d(LOG_TAG,"positive feedback callback");
                        dialog.dismiss();
                    }

                    @Override
                    public void onNegativeFeedback(FeedBackDialog dialog) {
                        Log.d(LOG_TAG,"negative feedback callback");
                        dialog.dismiss();
                    }

                    @Override
                    public void onAmbiguityFeedback(FeedBackDialog dialog) {
                        Log.d(LOG_TAG,"ambiguity feedback callback");
                        dialog.dismiss();
                    }

                    @Override
                    public void onCancelListener(DialogInterface dialog) {
                        Log.d(LOG_TAG,"feedback dialog cancel listener callback");
                        dialog.dismiss();
                    }
                })
                .show();  // Finally don't forget to call show()

Feedback Dialog API

You can check below some of the exposed API methods to control the Dialog apperance and actions. Hereby I'll try to maintain backward compatibility for Minor version and patch version and probably breaking changes in Major version changes ( refer semver )

  1. setIcon(@DrawableRes int mIcon) - set Drawable Image at top of the Dialog as Icon.
  2. setTitle(@StringRes int mTitle) - set Title or Brand Name for the Feedback Dialog
  3. setDescription(@StringRes int mDescription) - set Description or Additional text for Feedback Dialog
  4. setPositiveFeedbackText(@StringRes int mPositiveFeedbackText) - set Positive Feedback button text
  5. setNegativeFeedbackText(@StringRes int mNegativeFeedbackText) - set Negative Feedback button text
  6. setAmbiguityFeedbackText(@StringRes int mAmbiguityFeedbackText - set Ambiguity Feedback button text
  7. setPositiveFeedbackIcon(@DrawableRes int mPositiveFeedbackIcon) - set Positive Feedback button Icon as drawable resource
  8. setNegativeFeedbackIcon(@DrawableRes int mNegativeFeedbackIcon) - set Negative Feedback button Icon as drawable resource
  9. setAmbiguityFeedbackIcon(@DrawableRes int mAmbiguityFeedbackIcon) - set Ambiguity Feedback button Icon as drawable resource
  10. setBackgroundColor(@ColorRes int mBackgroundColor) - set Feedback Dialog background color
  11. setIconColor(@ColorRes int mIconColor) - set Title and Action Icon colors
  12. setReviewQuestion(int mReviewQuestion) - set Questionable message to end-user which is shown in Dialog
  13. setOnReviewClickListener(FeedBackActionsListeners reviewActionsListeners) - set Feedback Action listeners which implements action listeners callback.
  14. dismiss() - dismiss the active Feedback Dialog

API's which are added or removed will be updated in the above list. If possible, there will be seperate documentation site with examples in upcoming revisions.

RoadMap

  • Animating Popup style for dialog Icon and adding shadow to it.
  • Swipe left for next review similar to Google Maps reviews.
  • Animating Feedback dialog while opening and closing.

Inspiration

As Active Google Maps reviewer, usually I would answer review questions via Google Maps for Android. They have similar but better dialog to collect information and facts about the places with lot of animations like swipe, popup. Inspired from those user interface just thought to develop a component for collecting feedback without filling-up huge forms or monotonous UI.

Contribution and Issues

We love contributions from everyone. By participating in this project, you agree to abide by the thoughtbot code of conduct.

We expect everyone to follow the code of conduct anywhere in thoughtbot's project codebases, issue trackers, chatrooms, and mailing lists.

Contributing Code

Make your change, with new passing tests. Follow the style guide.

Push to your fork. Write a good commit message. Submit a pull request.

Others will give constructive feedback. This is a time for discussion and improvements, and making the necessary changes will be required before we can merge the contribution.

License

Apache-2.0

feedbackdialog's People

Contributors

shivasurya 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

feedbackdialog's Issues

Optionally display an image above the question

We've been considering implementing something like that in Open Food Facts for a while.
So glad your library exists :)

It would be great to be able to display an image above the question, to serve as a reference, to be able to make modals like:

"Does this photo contain the organic label ?"

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.