Into my project I am using viewpager with three tabs named History,Main,Map.Main activity contain Timer,stopwatch,etc
History
Main
Map
// if the child view to be added is already bound to a parent, then remove the child from the parent and then add again to the container.
if (v.getParent() != null) { ((ViewGroup) v.getParent()).removeView(v); } container.addView(v);