🔥 Huge shoutout to @SVDG_XEC the absolute legend who just swept through my #NFT collection like a storm! 🙌
— Gaexe (@gaexe_) May 30, 2025
Your support isn’t just noticed — it’s legendary. You didn’t just collect — you made history. 🚀
Looks like I’ll be pulling an all-nighter tonight.👨💻🌙 #NFTCollector $XEC pic.twitter.com/vKwKByk7fi
I am developing a simple Widget for my Android app based on the following Google StackWidget example .
I am using the Glide image library and trying to populate an ImageView method from getViewAt a class StackWidgetService that extends RemoteViewsService. My code is similar to:
Handler uiHandler = new Handler(Looper.getMainLooper());
uiHandler.post(() ->
Glide.with(context)
.asBitmap()
.load(widgetItems.get(position).image_url)
.into(new SimpleTarget<Bitmap>(512, 512) {
@Override
public void onResourceReady(Bitmap bitmap, Transition transition) {
rv.setImageViewBitmap(R.id.widget_item_image, bitmap);
}
})
);What is the best way to load an image from a URL to populate a RemoteView of an Android Widget?
Solution
Just need to do it synchronously. This seems to work fine:
try {
Bitmap bitmap = Glide.with(context)
.asBitmap()
.load(widgetItems.get(position).image_url)
.submit(512, 512)
.get();
rv.setImageViewBitmap(R.id.widget_item_image, bitmap);
} catch (Exception e) {
e.printStackTrace();
}
