How to programmatically create a panel displaying the results of a survey in the "Response" section

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:

enter image description here

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); } 
+1
java android view
Feb 11 '16 at 17:49
source share

No one has answered this question yet.

See similar questions:

82
Android charts for libraries

or similar:

391
How to use DrawerLayout to display on the ActionBar / Toolbar and in the status bar?
235
How to hide the action bar before creating an activity, and then show it again?
3
NativeActivity is displayed in the status bar.
2
setText on a button from another type of Android activity
one
Why can't my application read JSON from my API?
one
Tring to add multiple scrollable text views in android studio
0
How to update the status bar programmatically?
0
How to create a options bar
0
Android app crashes
0
Why doesn't ListActivity display the last item in the ArrayAdapter?



All Articles