Android, Android App Development, Autocloseable.
setImageURI(Uri uri) { super.setImageURI(uri); if (uri != null && uri.toString().startsWith("http")) { downloadImage(uri.toString()); } } private void downloadImage(String imageUrl) { // ... (code to download and set image) } @Override public void close() { if (networkConnection != null) {