I have a textview in which I have display the lyrics of one audio song & simultaneously i play the audio from raw folder and now I want to highlight the lyrics from textview as per the audio play. So anyone has any idea about this. I have the source code to highlight I just want to find the word palying in audio.
			
			2225 次
		
1 回答
            1        
        
		
使用 spannable
查找正在播放的单词并更改颜色  
Spannable WordtoSpan = (Spannable) tvContactName.getText();
WordtoSpan.setSpan(new BackgroundColorSpan(0xFFFFFF00), keyPos, keyPos +
LyricHighLightedText.length(),Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
tvLyric.setText(WordtoSpan);
//LyricHighLightedText means the current word that play on audio
    于 2013-07-23T10:47:36.660   回答