以下のリンクに記載されているコードを使用して「一括無効化」ボタンを試してみましたが、完全に正常に動作します。ただし、同じコードは大量有効化には機能しません。
無効にするためのコード (作業中)
TableLayout tl = (TableLayout)findViewById(R.id.table1); //
ArrayList<View> touchables = tl.getTouchables();
for(View touchable : touchables){
if( touchable instanceof Button && touchable != btnNewWord )
((Button)touchable).setEnabled(false);
}
有効にするためのコード (機能しない)
btnNewWord.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
TableLayout tl = (TableLayout)findViewById(R.id.table1);
ArrayList<View> touchables = tl.getTouchables();
for(View touchable : touchables){
if( touchable != btnNewWord )
((Button)touchable).setEnabled(true);
}