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.
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.