I am creating a survey application and would like to create a dashboard that displays the survey results in real time. In other words, the panel is updated as users respond to survey questions.
This user interface should be executed programmatically, since I'm going to get the poll results from Firebase. I studied the idea of ββcreating a basic view under my TextView, as shown below. However, I am interested to know if there are any known libraries or other methods for displaying the results:

And my code is:
public void addRadioButtonsWithFirebaseAnswers(DataSnapshot dataSnapshot, int numberOfAnswers) { mPollAnswerArrayList = new ArrayList<RadioButton>(); for (int i = 0; i < numberOfAnswers; i++) { mPollAnswerArrayList.add(i, new RadioButton(getActivity().getApplicationContext())); String firebaseChild = String.valueOf(i + 1); mPollAnswerArrayList.get(i).setText(dataSnapshot.child("Poll_Answers").child(firebaseChild).getValue().toString()); mPollAnswerArrayList.get(i).setTextColor(getResources().getColor(R.color.black)); mParams.setMarginStart(120); mPollQuestionRadioGroup.addView(mPollAnswerArrayList.get(i), mParams); View barResult = new View(getContext()); barResult.setBackgroundColor(R.color.actionRed); barResult.setMinimumHeight(1); barResult.setMinimumWidth(1); mPollQuestionRadioGroup.addView(barResult, mParams); }
java android view
tccpg288 Feb 11 '16 at 17:49 2016-02-11 17:49
source share