Android:可以将imageview下载到手机或将imageview设置为背景吗?

发布于 2024-09-18 02:16:11 字数 108 浏览 4 评论 0原文

我有一个包含图片库的应用程序,当按下图库中的其中一个项目时,该项目将单击视图作为图像视图全屏。然后我想做的是允许用户选择是否将图像视图下载到手机或将其设置为背景......这可能吗?我该怎么办呢?谢谢!

I have an app that contains a picture gallery when one of the items in the gallery is pressed, the item clicked views as an imageview fullscreen. What I am then trying to do is allow the user to select whether to download the imageview to the phone or set it as a background...is this possible? How would I go about this? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

那小子欠揍 2024-09-25 02:16:11

您可以使用WallpaperManager 服务到系统壁纸。

you can use WallpaperManager Service to the the system wallpaper.

旧人 2024-09-25 02:16:11
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), resourcId);
    WallpaperManager myWallpaperManager =     WallpaperManager.getInstance(getApplicationContext());
    try {
        myWallpaperManager.setBitmap(bitmap);

    } catch (IOException e) {
        e.printStackTrace();
    }
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), resourcId);
    WallpaperManager myWallpaperManager =     WallpaperManager.getInstance(getApplicationContext());
    try {
        myWallpaperManager.setBitmap(bitmap);

    } catch (IOException e) {
        e.printStackTrace();
    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文