I make a list view with Adapter and and I have a toggle button that i hope can showing a toast, but it didn't work...

this is my codes in AppCompactActivity

```
 protected void onCreate(Bundle savedInstanceStated){
    super.onCreate(savedInstanceStated);
    setContentView(R.layout.list_activity);

    QuestionsListAdapter q = new QuestionsListAdapter(this, questions, picture);
    list = (ListView) findViewById(R.id.list);
    list.setAdapter(q);

}

```

And this is getView function in my ListAdapter

```
public View getView(int position,View view,ViewGroup parent) {
    LayoutInflater inflater=context.getLayoutInflater();
    final View rowView=inflater.inflate(R.layout.pictures_question, null,true);

    ImageView pic = (ImageView) rowView.findViewById(R.id.q_picture);
    question = (TextView) rowView.findViewById(R.id.txt_q_question);
    btnPlayer = (ToggleButton) rowView.findViewById(R.id.btn_q_player);

    question.setText(questions[position]);
    pic.setImageResource(picture[position]);

    teks  = question.getText().toString();

    btnPlayer.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if (btnPlayer.isChecked()){
                Toast.makeText(context.getApplicationContext(), teks + " ON", Toast.LENGTH_SHORT);
            } else if (!btnPlayer.isChecked()){
                Toast.makeText(context.getApplicationContext(), teks + " OFF", Toast.LENGTH_SHORT);
            }
        }
    });

    return rowView;

};

```

So, I hope someone can resolve this problem