Android Change TextView for each click - XML -
I am working on Android and parsing it and reading the value from XML. But now I have a question. When I click on the next button I want to change the text view text and the text will be changed in the context of the xml file. For example,
& lt; Question & gt; & Lt; Question & gt; & Lt; ID & gt; 1 & lt; / Id & gt; & Lt; Text & gt; Question1 & lt; / Text & gt; & Lt; / Question & gt; & Lt; Question & gt; & Lt; ID & gt; 2 & lt; / Id & gt; & Lt; Text & gt; Question2 & lt; / Text & gt; & Lt; / Question & gt; & Lt; Question & gt; & Lt; ID & gt; 3 & lt; / Id & gt; & Lt; Text & gt; Question3 & lt; / Text & gt; & Lt; / Question & gt; & Lt; / Question & gt; If this is my XML file, then I want to update the text view every time I click on the next button. I can not do this, can someone help me?
To start, I will parse your XML data "query" to store your data Create an object then store the query object in the array list, when you click on the "Next" button, find the ID for the question you want and update the text view from the array list Also, see this topic here
Comments
Post a Comment