Дайте Id свой LinearLayout
, например:
<LinearLayout android:id="@+id/laidout"
...>
а затем из вашего класса Java говорят:
...
case R.id.Button03:
//text.setText("Button 3 was clicked");
.................... // ?
mlayout= findViewById(R.id.laidout);
// set the color
mlayout.setBackgroundColor(Color.WHATEVER);
// you can use setBackgroundResource() and pass appropriate ID
// if you want a drawable bundled as resource in the background
mlayout.setBackgroundResource(R.drawable.background_img);
break;
...
[EDIT]: добавлен код для вещи, запрошенной в комментарии