Android Studio klare Ansichten des Layouts

//either this
layout.removeAllViews();

//or this
((LinearLayout) findViewById(R.id.layout)).removeAllViews();
Rapha149