-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load images through RemoteViews in widget #242
Comments
The odds of this feature making it in are definitely higher if you implement it and put up a pull request! :). You're correct however that Glide doesn't currently offer an API specifically for RemoteViews. Take a look at |
Sure will do it when i get some free time! I hope to make a pull request asap! Thank you for the response! |
Actually as i am searching for ways to do this i can't seem to find a way to get a height and width of a RemoteView, so i will just try it on the blind for the moment and report back! |
There's no way to get anything back from the RemoteViews. You can only operate on things you know (i.e. hardcoded in the layout XML). RemoteViews is just a list of things to set on remote Views. Essentially a So at best the generic solution would involve a call to override or equivalent to let Glide know of view size. There's a limitation too, a RemoteViews can only store I learned all of the above while I was trying to make text the biggest possible without a linebreak and while it's "trivial" in a normal layout, it is impossible in widgets: you don't have any clue about widget size nor TextView size, not to mention I would be happiest to be proven wrong though, good luck with widgets! |
@TWiStErRob Υes, that's why at the moment i am not going to deal with ImageView's size and use something built-in from Glide! I have written a new custom class extending BaseTarget but dealing with RemoteViews. Though I need to test it because it's only a theory for the moment and code in paper. |
|
Ability to load a bitmap into an ImageView of a Widget using RemoteViews. Example of usage on the following gist https://gist.github.com/pavlospt/00242d5102ac8f76e169
#248 has been merged and closed. |
Is there any chance that this feature request would be implemented in a next release?
I have searched but did not find anything about RemoteViews and Glide.
The text was updated successfully, but these errors were encountered: