How can i show/Hide imageView in recyclerView as TTS(text to speech) plays for all the available list items, one by one!
Activity method -This met
Put the below code snippet inside your Adapter in OnBindViewHolder
text = item.first + " " + item.getSecond() + " Za " + item.getResult() + ".";
tts.speak(text, TextToSpeech.QUEUE_ADD, null);
boolean speakingEnd = tts.isSpeaking();
if(speakingEnd){
Toast.makeText(getApplicationContext(), "Speaking...."+position, Toast.LENGTH_SHORT).show();
multiples1.setImage_show(true);
mAdapter.notifyItemChanged(position);
} else {
Toast.makeText(getApplicationContext(), "Done...."+position, Toast.LENGTH_SHORT).show();
}
May this help Thanks.