1. Are you ready for the Galaxy S20? Here is everything we know so far!

Getting attributes from programatically added Views

Discussion in 'Android Development' started by Tito_Lortex, Jul 27, 2020.

  1. Tito_Lortex

    Tito_Lortex Lurker
    Thread Starter

    I'm stuck developing an App that does the following:

    I can add "Spots" with the Add button at the bottom of the activity_main.xml, I add them programatically, so I have a Layout with the "Spot Editor" that are just buttons and Text Inputs of every row to be added.

    I inflate the entire Layout as a View in the activity_main.xml, so then I just want to fill data in the buttons and text inputs and "Add the Spot", so I delete that View of "Edit the Spot" and put another View programatically just the same way that is the "Final Spot", that displays the filled data with Text, not Text Inputs.

    With the pencil icon I want to go back to "Edit mode"...

    How can I get the data from the programatically added Views to fill the new Views (that I'm also adding programatically to the layout)?

    Attached Files:


Share This Page