androidperformanceandroid-layout

improve layout performance


I am freelancing to solve crash of an Android app. It happens on startup, and I know it is because the activity_main.xml. It has too many views, too many nesting levels. Apart from that (which I will try to reduce)

what are other strategies to improve layout performance in Android?

The user interface cannot be changed or simplified. For example:


Solution

  • I have been recently working on improving performance of app and renderd a fast smooth UI let me share you my experience :

    The vision of performance in terms of UI is:

    Lower the latency of screen draws
    Create fast, consistent frame rates to avoid jank/lag.
    

    And there are some thumb rules for layouts .

    Minimum view hierarchy.

    minimum background drawbles

    minimizing overdraw of window :

    minimizing overdraw of Views

    using drawble left instead of image and textview aligned horizontally.

    using lists/recyclerview very often when repetitive view

    and Many more . let me share some links which are really helpful

    https://medium.com/@elifbon/android-application-performance-step-1-rendering-ba820653ad3#.pp7hpnv07

    https://www.safaribooksonline.com/library/view/high-performance-android/9781491913994/ch04.html

    https://riggaroo.co.za/optimizing-layouts-in-android-reducing-overdraw/

    https://www.hackerearth.com/notes/rendering-performance-in-android-overdraw/

    Letme know if it's helpful. Cheers