Currently I am working on a music player application and I would like to change the text of a button.

Here is my code . playM is a "Play" button while stopM is to stop, the logic is when the play button is pressed , the text of playM change from "Play"(the default text of playM is "Play") to "Pasue". Then when the stopM is pressed , the playM change from "Pause" to "Play"

However, the actual behavior is when I hit playM is change text from Play to Pause but when I hit stopM the playM does not change from Pause to Play. How to fix the problem ? Thanks 

```
public class Adapter extends ArrayAdapter<Song> {
    Button playM = null;
    Button stopM = null;

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        View v = convertView;

        if (v == null) {

            LayoutInflater vi;
            vi = LayoutInflater.from(getContext());
            v = vi.inflate(R.layout.list_view, null);

        }

        p = items.get(position);

        if (p != null) {

            TextView tt = (TextView) v.findViewById(R.id.textView1);
            tt1 = (TextView) v.findViewById(R.id.textView2);
            Button del = (Button) v.findViewById(R.id.button1);
            playM = (Button) v.findViewById(R.id.button2);
            stopM = (Button) v.findViewById(R.id.button3);

            String title = p.getTitle();
            String singer = p.getSinger();

            if (tt != null) {
                tt.setText(title);
            }
            if (tt1 != null) {
                tt1.setText(singer);
            }

            del.setOnClickListener(new View.OnClickListener() {
                public void onClick(View v) {
                    db.deleteSong(p);
                }
            });

            playM.setOnClickListener(new View.OnClickListener() {
                public void onClick(View v) {
                    //AudioManager manager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);
                    //if (!manager.isMusicActive()) {
                        playM.setText("Pause");
                        Intent svc=new Intent(getContext(), Music.class);
                        svc.putExtra("uri", tt1.getText().toString());
                        getContext().startService(svc);
                    //}
                }
            });

            stopM.setOnClickListener(new View.OnClickListener() {
                public void onClick(View v) {
                    playM.setText("Play");
                    Intent svc=new Intent(getContext(), Music.class);
                    getContext().stopService(svc);
                }
            });
        }

        return v;

    }
}

```