【问题标题】:How to deal with Choreographer: Skipped 130 frames when I got ListView inside BaseAdapter如何处理 Choreographer:当我在 BaseAdapter 中获取 ListView 时跳过 130 帧
【发布时间】:2016-03-04 21:01:16
【问题描述】:

我有一个名为 NoteList 的片段,它显示来自 json 的数据列表。在我的主 ListView 中,我用另一个 ListView 加载它。我使用BaseAdapter。因此,在该适配器内部,我执行另一个 BaseAdapter 来填充内部 ListView。一切顺利。

但每次打开 LogCat 时我都不满意。我必须看到这个I/Choreographer: Skipped 130 frames! The application may be doing too much work on its main thread.

JSON 数据不包含任何图像,仅包含字符串。

如何处理?

【问题讨论】:

    标签: android performance android-listview


    【解决方案1】:

    错误本身是不言自明的The application may be doing too much work on its main thread。因此,将一些代码从主线程移到后台线程。检查您是否在主线程上解析数据。即使没有图片,所有的 HTTP 连接和 JSON 数据的解析都必须在后台线程上完成

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-04-30
      • 2012-09-09
      • 1970-01-01
      • 1970-01-01
      • 2011-10-17
      • 2017-12-31
      • 1970-01-01
      相关资源
      最近更新 更多