andreid / surveylib Goto Github PK
View Code? Open in Web Editor NEWThe Best Looking Survey Library for Android
The Best Looking Survey Library for Android
Hi, In the examplejson1, in the third page, the keyboard appears, even if there is nothing to write. What you write apperars in the next page, that is indeed string type
Hi,
maybe I just get it wrong, but no questions are displayed?
any ideas, why this is so?
cheers
piotr
Hi,
in the example example1.json, there is a description "(Select all that apply)", that actually doesnt' appear in the survey. Is it maybe that the font color is the same as the background? (white).
UPDATE as @CrandellWS pointed out, it's just that it is not implemented. It should be in FragmentCheckBoxes.java
and its xml. Thanks
Hi how to add Images type in Question
there is no validation
I would like the answers to be added to a firebase database
first of all, I'm so thankful to see your work done. great job! This lib looks promising. Is it possible to adding selection choices and pop up input based on previous selections?
Survey answers appends to previous answers.
how to clear all answers?
I am using realm to store and retrieve utf-8 for nepali(Devnagari) characters but when retrieving � is also generating which is not a nepali(Devnagari) character and not stored. How to solve this issue? Along with realm I have used Gson and retrofit.
hi Andre,
many thanks for your library for suvey
i was modified your code to get more better survey and can save to databse..
this output for my modified
"survey_properties": {
"intro_message": "Your feedback helps us to build a better mobile product.
Hello, Feedback from our clients, friends and family is how we make key decisions on what the future holds for XYZ App.
By combining data and previous feedback we have introduced many new features e.g. x, y, z.
It will take less than 2 minutes to answer the feedback quiz.",
"end_message": "Thank you for having the time to take our survey.",
"skip_intro": false
},
"questions": [
{
"question_type": "Checkboxes",
"question_id": 3,
"question_title": "Do you currently use one of these other software solutions?",
"description": "",
"required": false,
"random_choices": true,
"choices": [
{
"idChoice": 1,
"valueChoice": "Yes, I use a red product"
},
{
"idChoice": 2,
"valueChoice": "I use a green product"
},
{
"idChoice": 3,
"valueChoice": "I partialy use a blue product"
}
]
},
{
"question_type": "String",
"question_id": 4,
"question_title": "Why did you not subscribe at the end of your free trial ?",
"description": "",
"required": false
},
{
"question_type": "Radioboxes",
"question_id": 2,
"question_title": "What is your age group ?",
"description": "",
"required": true,
"random_choices": false,
"choices": [
{
"idChoice": 1,
"valueChoice": "less than 20"
},
{
"idChoice": 2,
"valueChoice": "20-30"
},
{
"idChoice": 3,
"valueChoice": "30-40"
},
{
"idChoice": 4,
"valueChoice": "40-50"
},
{
"idChoice": 5,
"valueChoice": "50+"
}
]
},
{
"question_type": "Checkboxes",
"question_id": 1,
"question_title": "What were you hoping the XYZ mobile app would do?",
"description": "(Select all that apply)",
"required": false,
"random_choices": false,
"choices": [
{
"idChoice": 1,
"valueChoice": "thing #1"
},
{
"idChoice": 2,
"valueChoice": "thing #2"
},
{
"idChoice": 3,
"valueChoice": "thing #3"
},
{
"idChoice": 4,
"valueChoice": "thing #4"
}
]
},
{
"question_type": "Radioboxes",
"question_id": 2,
"question_title": "What is your age group ?",
"description": "",
"required": true,
"random_choices": false,
"choices": [
{
"idChoice": 1,
"valueChoice": "less than 20"
},
{
"idChoice": 2,
"valueChoice": "20-30"
},
{
"idChoice": 3,
"valueChoice": "30-40"
},
{
"idChoice": 4,
"valueChoice": "40-50"
},
{
"idChoice": 5,
"valueChoice": "50+"
}
]
},
{
"question_title": "If this app was paid, how much you would give to have it ?",
"question_id": 5,
"description": "",
"required": false,
"question_type": "Number"
},
{
"question_id": 6,
"question_title": "berapa istri yang sudah kamu miliki ?",
"description": "jelaskan dengan detail ",
"required": true,
"question_type": "Number"
},
{
"question_id": 7,
"question_type": "StringMultiline",
"question_title": "We love feedback and if there is anything else you’d like us to improve please let us know.",
"description": "",
"required": false,
"number_of_lines": 4
}
]
****************** WE HAVE ANSWERS ******************
androidadvance.com.androidsurveyexample E/ANSWERS JSON: [{"Answer":[{"idChoice":"2","selected":true,"valueChoice":"I use a \u003cfont color\u003d\u0027#00AA00\u0027\u003egreen product\u003c/font\u003e"},{"idChoice":"1","selected":true,"valueChoice":"\u003cfont color\u003d\u0027#AA0000\u0027\u003eYes, I use a \u003cstrong\u003ered\u003c/strong\u003e product\u003c/font\u003e"}],"Ask":"Do you currently use one of these other software solutions?","idAsk":"3"},{"Answer":[{"idChoice":"2","selected":true,"valueChoice":"I use a \u003cfont color\u003d\u0027#00AA00\u0027\u003egreen product\u003c/font\u003e"},{"idChoice":"1","selected":true,"valueChoice":"\u003cfont color\u003d\u0027#AA0000\u0027\u003eYes, I use a \u003cstrong\u003ered\u003c/strong\u003e product\u003c/font\u003e"}],"Ask":"Do you currently use one of these other software solutions?","idAsk":"3"},{"Answer":[{"idChoice":"0","selected":false,"valueChoice":"Qw"}],"Ask":"Why did you not subscribe at the end of your free trial ?","idAsk":"4"},{"Answer":[{"idChoice":"1","selected":false,"valueChoice":"less than 20"}],"Ask":"What is your age group ?","idAsk":"2"},{"Answer":[{"idChoice":"2","selected":true,"valueChoice":"thing #2"}],"Ask":"What were you hoping the XYZ mobile app would do?","idAsk":"1"},{"Answer":[{"idChoice":"3","selected":false,"valueChoice":"30-40"}],"Ask":"What is your age group ?","idAsk":"2"},{"Answer":[{"idChoice":"0","selected":false,"valueChoice":"4"}],"Ask":"If this app was paid, how much you would give to have it ?","idAsk":"5"},{"Answer":[{"idChoice":"0","selected":false,"valueChoice":"1"}],"Ask":"berapa istri yang sudah kamu miliki ?","idAsk":"6"},{"Answer":[{"idChoice":"0","selected":false,"valueChoice":"qwerty\ndggg"}],"Ask":"We love feedback and if there is anything else you’d like us to improve please let us know.","idAsk":"7"}]
androidadvance.com.androidsurveyexample E/****: *****************************************************
so i can get the id of question and answer from output json.
can you add fragment for take a picture.. or if you bussy i will create my self
your save my time
Please feel free to add me as a contributor or even transfer the project to me and I can help offer people support.
https://help.github.com/articles/about-repository-transfers/
I have saved data using realm. what can be the way if i want to edit saved data form wise?
Looking through the code, it seems I can pass in a style string but there is no format specified for this string.
Can you please provide a sample?
I would like to change the default color of the button, background and question text.
I have 20 questions and it seems to crash once I 'submit' the 10th. I've moved questions around and it continues to work until the 10th question so I don't think it's a formatting error. Works perfectly up until that point and I've tested with less than 10 questions and the answers are output as expected.
Any ideas?
07-20 15:19:47.342 9834-9834/com.example.litrans.carboncount E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.litrans.carboncount, PID: 9834
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
at java.io.StringReader.<init>(StringReader.java:50)
at android.text.HtmlToSpannedConverter.convert(Html.java:746)
at android.text.Html.fromHtml(Html.java:242)
at android.text.Html.fromHtml(Html.java:185)
at com.androidadvance.androidsurvey.fragment.FragmentRadioboxes.onActivityCreated(FragmentRadioboxes.java:103)
at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:2363)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1442)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:799)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322)
at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:2199)
at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:651)
at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:145)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1236)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:662)
at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:624)
at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:605)
at com.androidadvance.androidsurvey.SurveyActivity.go_to_next(SurveyActivity.java:128)
at com.androidadvance.androidsurvey.fragment.FragmentRadioboxes$1.onClick(FragmentRadioboxes.java:50)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Hi,
I have a problem with clearing the Answer Data after I have submitted the survey results and go back to do a new survey. The data is persistent and keeps on adding I just cannot work out how to clear this data and start a completely new survey.
Finally thanks for creating this useful library.
It has been a real time saver.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.