If I'm running as a third party library within an android application, and I want to check whether the imageviews on screen were loaded from locally bundled resources or were loaded from a remote uri - is there a way of doing this at runtime? Is there perhaps some clue in the view tree that would help me group the imageviews into these two broad categories? I see that the uri field itself isn't providing anything useful by reflection. I can ask developers to tag the imageviews but that creates a substantial overhead for them that I prefer to avoid.
How to check at runtime if an imageview came from a local or remote resource?
32 Views Asked by Jon At
1
There are 1 best solutions below
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in IMAGEVIEW
- How can I get the images to scale with different screen sizes in Android Studio?
- Setting an image in JavaFX. Exception Invalid URL
- Any ideas why my Android Studio app randomly crashes on setting drawable for ImageView?
- Android ImageView not displaying correctly
- How to set image filter only in some part of image in Android
- App with Imageview scale in Android Studio emulator Small Device breaks without error
- Background probleam in android application
- Scale image on width and crop on height with Coil
- How to get screen dimensions
- Maintaining aspect ratio while resizing borderpane
- How to reset imageview to original/clean state after PAN and Zoom before setting new bitmap
- Android ImageButton and TextView index position in Framelayout
- Detect a click on a specific x and y coordinates from an imageView
- What are the units used when Image is moved in Kotlin. Matrix.tranlate vs view.scrollby
- How to tap to zoom an image like in instagram? Kotlin
Related Questions in ANDROID-IMAGE
- change selected gridview cell background in android?
- load image with image-chooser-library
- Android app Image is not saving in specified Sd Card folder after Crop, Showing empty folder
- Shadow effect for image in all sides
- Sending Image From Android to C# webservice
- Multiple image delete
- How to add two different layouts to Listview?
- Create Same Size Image Across Various Android Densities
- Scale imageview on left to imageview on right's height
- Full screen background image size for android wear
- Show random images based on the random generated number they have in Android studio?
- Images and Directories not showing in Drawables directory
- If I have an image 50dp wide/tall in xhdpi, what size do I make for mdpi?
- Resize image URI to 100k
- How to convert image to string in Android?
Related Questions in IMAGE-LOADING
- Replace image without server request using Fresco
- How to load images,audio from folder in Project to work in .jar file
- c++ read in image set with different file names without hardcoding
- Load image from url to Recyclerview
- How to download an image using Glide via HTTP POST method
- Xamarin: FFImageLoading not showing using inside list view on iOS
- Facebook Profile Picture not loading using Picasso on some devices (Android)
- Universal-Image-Loader | SSLHandshakeException: Handshake failed
- java.lang.NoSuchMethodError: package.call.getDrawable
- How to show the loader image until the page data loads?
- Faster loading of images
- NSOperationQueue Issue
- Loading image show when i click a button in jquery/javascript
- Can Picasso queue for me?
- Glide Imgae loading is taking too much time in recyclerview android
Related Questions in BITMAPDRAWABLE
- How to check at runtime if an imageview came from a local or remote resource?
- How to clear BitmapDrawable.getBitmap()' on a null object reference on a null object reference error
- layer-list drawable gets automatically converted to BitmapDrawable
- Set offset for BitmapDrawable while repeating in the x and y direction?
- why splash screen in android doesn't fit inside the available space?
- How to fix deprecated issue in Android Bitmap?
- Duplicate images while loading the images from android assets as Bitmap and setting ImaegView using glideV4
- Preserve Bitmap dimensions when saving to file from ImageView
- repeate tile image with paths in android
- LRUCache BitmapDrawable
- HorizontalScrollView fill with repeatable image
- setBackground from Bitmap API 22+
- Different drawable loading from app resources versus test resources
- Android: cannot cast BitmapDrawable to a ClipDrawable
- How to show Android SeekBar progressChanged value inside SeekBar thumb?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
No. ImageViews hold Drawables. The view has no idea where that drawable came from. It doesn't even know what type of Drawable it is.
Also, using setImageUri to show a remote image is generally a code smell- that causes it to request and decode on the UI thread, which can be a cause of performance issues. You should never be doing that, and use an external image cache to download images and properly thread things. There's a few large image libraries out there that do it for you (Glide and Picasso being the big two)