I write my songbook in Android Studio and there is a need to change the tone of the chords when you press the button, how can I implement this option? Here is an example of a site where it works, there are two buttons on the right and left of the caption letter http://amdm.ru/akkordi/ddt/3054/osen/

    1 answer 1

    1. Find a test field in the markup ( TextView )
    2. Find the button in the markup (Button)
    3. Hangs on the button listener clicks.
    4. In it, change the text TextView .
    • And if the amount of text data is very large? How can I make a program distinguish between plain text and a fragment I need to change? - Kirill
    • What does “very large volume”, “plain text” and “fragment I need” mean? It is impossible to give a more complete answer to the question you asked in its current wording than the one I have already written. You need to divide the task into parts and do everything in order. - YurySPb ♦
    • A large amount of this means that the text will be taken from the database, and well entered for each activation or fragment manually. And this means that a program should distinguish the text from the chord and only change the chord, and leave the text unchanged. For example, to conclude a chord in <> and already somehow recognize it .. - Kirill
    • Well, write down to the thread all possible chords and look for matches with them in the incoming text. - Yuriy SPb ♦
    • one
      Thank you very much, I will try - Kirill