Trying to use WordAdapter.this as a Context doesn't get accepted by the compiler in the following code:
playButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MediaPlayer mp = MediaPlayer.create(WordAdapter.this, currentWord.getAudioResourceId());
mp.start();
}
});
The class is WordAdapter, and it extends ArrayAdapter using a collection of Word objects.