I have created an app in Android Studio and linked with Real-time Database of Firebase. I have a table named Attendance Records in my database, in which the first key is employee ID, the second key is month, then date and then the details of that employee's attendance of that date.
I basically have to let the user view his attendance and his attendance record should have the rows of that date colored on which it was a holiday.
I have an activity in which user enters his empid along with year and month and then a table should be displayed with same column names as the details under the date key. I can do this by directly displaying the data snapshot but it can't be modified. I need to modify it in the way that I access another table Holidays and compare the dates mentioned in 'Holidays' table and the data snapshot of the specific user and color those rows (for which date exits in both tables) in the dynamically created table.
I am referring to https://technotzz.wordpress.com/2011/11/04/android-dynamically-add-rows-to-table-layout/ for dynamically creating the table.
How can I get values from the data snapshot one by one and put them in the while loop to enter them in the table rows which are being dynamically created?