我正在构建一个Android Things“信息亭”风格的应用程序,我希望图像像壁纸一样显示在背景中。我使用Unsplash源来获取随机图像,但源URL(https://source.unsplash.com/1080x1920/?long-exposure)总是重定向到图像URL,所以我不能使用这个:
InputStream is = (InputStream) new URL("https://source.unsplash.com/1080x1920/?long-exposure").getContent();
Drawable d = Drawable.createFromStream(is, "");
niceWallpaper.setImageDrawable(d);
有没有办法做到这一点?
浮云间
潇潇雨雨
相关分类