So I am trying to create a task app, in which, on the click of a button, I want my subtask custom view, which contains a text view, and 2 image views, inside a horizontal linear layout, to be displayed inside a vertical linear layout. The data required for the subtask is taken from a different activity, and then transferred using intents. Also, I need the id for every subtask that is added to be different. I have no idea how to do this. Please help. I couldn't code anything for this. I tried using layout inflater, searched up the net on what to do, but I still have no clue. Please help.
question from:
https://stackoverflow.com/questions/65660917/how-do-i-add-a-custom-layout-to-a-linear-layout-on-the-click-of-a-button 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…