Creating Buttons Dynamically, Could I select one and deselect the other buttons?
问题 I'm creating buttons dynamically ... for(int i=0; i<colSize;i++){ final Button btn = new Button(this); btn.setText(SectionName[i]); btn.setTextSize(10); btn.setPadding(8, 3,8, 3); btn.setTextColor(Color.WHITE); btn.setTypeface(Typeface.SERIF, Typeface.BOLD); btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { //***Every time that I click my button is selected !:) btn.setSelected(true); } }); } But how could I deselect the other buttons that were selected, I