package com.example.android.miwok;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ListView;

import java.util.ArrayList;

public class NumbersActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.word_list);

        // Create a list of words
        ArrayList<Word> words = new ArrayList<Word>();
        words.add(new Word("one", "lutti", R.drawable.number_one));
        words.add(new Word("two", "otiiko", R.drawable.number_two));
        words.add(new Word("three", "tolookosu", R.drawable.number_three));
        words.add(new Word("four", "oyyisa", R.drawable.number_four));
        words.add(new Word("five", "massokka", R.drawable.number_five));
        words.add(new Word("six", "temmokka", R.drawable.number_six));
        words.add(new Word("seven", "kenekaku", R.drawable.number_seven));
        words.add(new Word("eight", "kawinta", R.drawable.number_eight));
        words.add(new Word("nine", "wo’e", R.drawable.number_nine));
        words.add(new Word("ten", "na’aacha", R.drawable.number_ten));

        // Create an {@link WordAdapter}, whose data source is a list of {@link Word}s. The
        // adapter knows how to create list items for each item in the list.
        WordAdapter adapter = new WordAdapter(this, words, R.color.category_numbers);

        // Find the {@link ListView} object in the view hierarchy of the {@link Activity}.
        // There should be a {@link ListView} with the view ID called list, which is declared in the
        // word_list.xml file.
        ListView listView = (ListView) findViewById(R.id.list);

        // Make the {@link ListView} use the {@link WordAdapter} we created above, so that the
        // {@link ListView} will display list items for each {@link Word} in the list.
        listView.setAdapter(adapter);

    }
}


@@ -29,16 +29,50 @@
 miwok;%0A%0A
+import android.media.MediaPlayer;%0A
 import a
@@ -157,23 +157,78 @@
 oid.
-widget.ListView
+view.View;%0Aimport android.widget.ListView;%0Aimport android.widget.Toast
 ;%0A%0Ai
@@ -1767,16 +1767,22 @@
         
+final 
 ListView
@@ -2047,21 +2047,400 @@
 (adapter);%0A%0A
+        final MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.number_one);%0A%0A        listView.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View v) %7B%0A                Toast.makeText(getApplicationContext(), %22Playing sound%22, Toast.LENGTH_SHORT).show();%0A                mediaPlayer.start();%0A%0A            %7D%0A        %7D);%0A
     %7D%0A%7D%0A%0A

Update to the WordAdapter - Java file in the Miwok App