Can someone help me with this very simple question. I’m very+++ beginner.
This is my string for listview
String[] items = {"Silent night", "Deck The hall","Feliz navidad","Jingle bell", "song 4","song 5"};
Question:
How do I view lyric for each item in my listview? I store my lyric in res raw.
Details:
I have main textview and 4 buttons (Christmas, hillsong, button 3,button 4) in main.xml. When I click the Christmas button, it switches to the Christmas layout with Christmas songs list in the listview. When the title is clicked it refers back to main.xml and view the lyric in main textview.
Check out http://www.vogella.de/articles/AndroidListView/article.html for some good examples on using listviews
Basically you’ll create a new class that extends ListActivity.
Then you’ll need to check when the user clicks a list item and then pack it in and send it through an intent to your next activity with is lyrics.
Finally in the lyrics class you’ll need to retrieve the extras.
Now you have the song in the lyrics activity and you can take it from there. I pretty much just wrote your entire app…. x_X