to top

Best Practices for Performance

These classes and articles help you build an app that's smooth, responsive, and uses as little battery as possible.

  1. Managing Your App's Memory

    How to keep your app's memory footprint small in order to improve performance on a variety of mobile devices.

    1. Performance Tips

      How to optimize your app's performance in various ways to improve its responsiveness and battery efficiency.

      1. Improving Layout Performance

        How to identify problems in your app's layout performance and improve the UI responsiveness.

        1. Optimizing Layout Hierarchies
        2. Re-using Layouts with <include/>
        3. Loading Views On Demand
        4. Making ListView Scrolling Smooth
      2. Optimizing Battery Life

        How to minimize the amount of power your app requires by adapting to current power conditions and performing power-hungry tasks at proper intervals.

        1. Monitoring the Battery Level and Charging State
        2. Determining and Monitoring the Docking State and Type
        3. Determining and Monitoring the Connectivity Status
        4. Manipulating Broadcast Receivers On Demand
      3. Sending Operations to Multiple Threads

        How to improve the performance and scalability of long-running operations by dispatching work to multiple threads.

        1. Specifying the Code to Run on a Thread
        2. Creating a Manager for Multiple Threads
        3. Running Code on a Thread Pool Thread
        4. Communicating with the UI Thread
      4. Keeping Your App Responsive

        How to keep your app responsive to user interaction so the UI does not lock-up and display an "Application Not Responding" dialog.

        1. JNI Tips

          How to efficiently use the Java Native Interface with the Android NDK.

          1. SMP Primer for Android

            Tips for coding Android apps on symmetric multiprocessor systems.