Adding rows to LinearLayouts which serve as lists
Your problems in code seem to be a manifestation of problematic design. If I were you I would think about improving my design first.
Currently you're displaying a list of lists of variable lengths to your user. From a UX point of view that seems like a bad decision.
There's a reason why you can't use lists in a ScrollView ;)
Have you considered for example splitting up the lists to different fragments and putting them in a view pager so you have a separate tab for each list? Then you can use ListView or, probably even better, RecyclerView to display your items.
Again a lot of times when you have to write awkward, messy code to implement your design it is worth revisiting your design and improving it. Usually that clears up convoluted code as well.