Skip to content

Potential UI Thread Blocking Issue #352

Description

@nbd-boss

In ImageViewActivity.kt, getSurvivalDrawable is called directly in onCreate. This method synchronously reads files from assets and decodes the image, which may cause UI jank or dropped frames for large images.

According to Android best practices, the UI thread should not perform time-consuming file I/O or Bitmap decoding. It is recommended to move this operation to a background thread (e.g., using coroutines or an asynchronous task) and update the UI on the main thread once the operation is complete.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions