Android Studio Vues claires de la mise en page

//either this
layout.removeAllViews();

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