Adding views programmatically to LinearLayout but they don't appear
问题 I'm trying to populate a LinearLayout inside simple_pdf_example.xml with 10 printed_order_element2.xml just so I can generate a PDF with a ListView (which is actually a LinearLayout ). The problem is that when I do linearLayoutView.addView(v) 10 times, I don't see v inside the LinearLayout . I just see the original item I added in the xml just to see if the LinearLayout was rendering. SimplePDFSaver.java: package com.mypackage.example; import androidx.appcompat.app.AppCompatActivity; import