This is how you can speed up the loadingspeed of your application, as Activity's [font=Courier New]findViewByID[/font], like you probably used it up to now, is not that fast as you think. As you know the Android Layout-Structure is hierarchical (just like HTML and XML) and therefore the easiest way to represent it is a tree. The effect is bigger, as your layout gets more complex
Simpliefied Example Layout for this tutorial:
So if you do the following the Android-Runtime has to traverse the whole layout-tree every time you call findViewById (of your Activity). The better way is to call myView.findViewById when you habe nested a nested layout.
So, getting the both TextViews of the both TextViews from the example before worked like this:
Where the following is the faster way: