You are not adding sub-items dynamically, you are dynamically updating the data set. You only need to insert the empty collection first, add the insert data method to the adapter, and then refresh the adapter. It does not involve multiple layouts. For multiple layouts, you can write multiple ViewHolder then specify the type.
You are not adding sub-items dynamically, you are dynamically updating the data set. You only need to insert the empty collection first, add the insert data method to the adapter, and then refresh the adapter. It does not involve multiple layouts. For multiple layouts, you can write multiple ViewHolder then specify the type.