How do I set up a OnClickListener to simply tell me which index button was pressed from an array of buttons. I can change text and color of these buttons using the array. I
You can set Tag value and get the Tag on Click:
TButton[1] = (Button)findViewById(R.id.Button01); TButton[1].setTag(1); onClick(View v) { if(((Integer)v.getTag())==1) { //do something } }