I hope this helps . TL;DR The fastest solution would be to change your ad view android:layout_height="wrap_content" into android:layout_height="fixed size" so your ad view will have a single height and won't change because of its wrap_content attribute (If your ad view is not loaded you can think of wrap_content as height of 0 and only after its loaded it will have height, thus the layout jump).
it helps some times Before anything else, to my understanding, the canvas is actually an AdView - my guess is you're using AdMob. But, that's a View. A LinearLayout is a ViewGroup and as its Javadoc description says, it's a view that contains Views - imagine it's a container of Views. You're supposed to use ViewGroups within ViewGroups only, not have them within Views. A View is supposed to draw something simple: a text, an image, a drawable or any combination of these. I would suggest to start reading the User Interface article from developers.
In android tabbed activity, the tab with the imageview loads slowly. Is there a better way to code imageview?