android studio clear views of layout code example
Example: android studio clear views of layout
//either this
layout.removeAllViews();
//or this
((LinearLayout) findViewById(R.id.layout)).removeAllViews();
//either this
layout.removeAllViews();
//or this
((LinearLayout) findViewById(R.id.layout)).removeAllViews();