12. Adding audio #

Created Sunday 10 January 2021

Part 1 #

That’s okay, but how will the user ‘see’ the audio option.

Part 2 #

How to we add audio to the Miwok app?

Part 3 #

Which class will have the method for playing audio, and setting the listener. There can be several approaches:

  1. Change the Word class - we’ll have two methods, one for setting the audio_ID and the other for attaching the listener which will play the audio. But WordAdapter handles view, not Word. This will make Word interactive, which is not desired because Word’s primary motive is to carry data. We’ll have to pass the view to Word from WordAdapter.
  2. Change WordAdapter class - As this controlls the view, it is easier to attach the listener here.

Part 4 #

Visual Polish