Another common cause of performance problems is your app's Hierarchy View.
When the Android system renders each view, it goes through three stages: measure, layout, and draw. The time it takes the system to complete each stage is affected by the number of views in your hierarchy, and how these views are arranged.
Arranging your views in deeper, more complex, hierarchies will have a noticeable impact on your app's rendering speed. You should be on the lookout for any opportunities to flatten your view hierarchy and remove nested layouts.
As well as highlighting areas of overdraw, Hierarchy View helps you visualize your app's view hierarchy and provides some really useful performance information about how long each view ...