Android Studio Clear Vistas del diseño

//either this
layout.removeAllViews();

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