So usually a table row equals to one object.
Example each Person Object equals to one row in the table.
In my case I have a class Lesson which looks like this:
public class Lesson {
private Room schoolRoom;
private Room teachingRoom;
private TeacherSpecialization teachingInfo;
private WeekDay weekDay;
private int schoolHour;
}
This is what my table should look like:
As you can see, in my case each table cell equals to one lesson object. If there is no lesson on a specific day and the specific hour the cell should be filled with a button.
How can be this done. I only now that usually each row equals to one object?
I agree with @Jai comment. If you are pretty much looking for a simple table view for one week data, then you can align your data to suite TableView requirements and then set the items. If you requirement is more like a calendar, then the below approach may not suite.
Below is the demo if you want to convert your Lesson objects to table view data models and display. I also included to add Lessons dynamically.