lundi 29 décembre 2014

Playing a sound based on what part of text is clicked in Android

It's a little hard to explain my question so I'll explain it with an example.


This image is from the Quran Android app on the Playstore. When a user clicks on a verse, it highlights the verse, as can be seen in the example, and also brings up a menu from the bottom to let the user play a sound file corresponding to the text.


Another similar example. Let's say you had this text: "Hello. Thank you for answering my question. See you." If the user clicked on "Hello." part of this text, it would highlight it and play a sound corresponding to hello, let's say hello.mp3.


My question is, how do you go on about doing this? How do they do it in their app? Thank you.


Aucun commentaire:

Enregistrer un commentaire