To know if a view is added to a layout, you do
View view = layout.findViewById(int id);
or
View view = layout.findViewByTag(Object tag);
and ...
if(view != null) ... //view is already added
Depending on your requirements, you either then call layout.removeView(view) to remove the view and add a new, or update it or do nothing... or whatever you want :)