Replies: 1 comment
-
You can register a result listener in your calling activity to receive the fragment result: getSupportFragmentManager().setFragmentResultListener(QuestionnaireFragment.SUBMIT_REQUEST_KEY,
this, (requestKey, result) -> {
//the result is always an Bundle.EMPTY, but you can get the response from the questionnaire fragment itself
LOG.info("onFragmentResult: {} - {}", requestKey, result);
QuestionnaireResponse response = questionnaire.getQuestionnaireResponse();
LOG.debug("QuestionnaireResponse: {}", response);
}); The result is sent after the user clicked the Hope that helps anyone out there - better late than never ;) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
I have a question regarding the "submit" button introduced on the latest version of the library.
How do you guys manage the callback from that button? I haven't find a way to add an onClickListener or any other way. I even tried to remove it using the QuestionnaireFragment.builder().setShowSubmitButton(false) but it doesn't seem to work either.
Any ideas/suggestions would be greatly appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions