Why this text view is not refreshing +android
i used following code to play a audio while letter is drawing on text view.( I don't want to put it in another thread to give time delay like i done here). In my code word is drawing at a time after while loop exits.. Any soln? TIA
while(i < names[position].length() ) {
alphabets1=alphabets1+""+tempName.charAt(i);
letterPosition=findLetters(tempName.charAt(i));
if(mPlayVoice!=null)
开发者_Go百科 {
while(mPlayVoice.isPlaying()){
//wait until audio stops
}
mPlayVoice.release();
mPlayVoice=null;
}
mPlayVoice = MediaPlayer.create(BirdsActivity.this, mAlphabetsSound[letterPosition]);
mPlayVoice.start();
txtFrontName.setText(alphabets1); // problems here
txtFrontName.refreshDrawableState();
if(i >= names[position].length())
wordsDrawingCompleted=true;
else
wordsDrawingCompleted=false;
i++;
}
try the txtFrontName.invalidate();
after set the text
精彩评论