Scrollview and OnClick handlers not working when view is cleared and re-created
I've managed to resolve the issue I was having. I tried what was suggested but unfortunately it didn't have a lot of effect.
What I had currently was one fragment, which had to linear layout containers, and when the view was switched one container was hidden and the container shown and then reload the relevant view content.
I've instead changed it so each view, is instead in a different fragment and with its own XML layout file, then when the view is switched, it uses a fragment transaction to replace one fragment view with the other and then uses the same code as I had above to dynamically populate the relevant view content.