从墙纸获得色彩? -安卓 [英] Get color from wallpaper? - Android

查看:67
本文介绍了从墙纸获得色彩? -安卓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何找到当前壁纸的(平均)颜色并将其设置为小部件上的布局?

How can I find the (Average) color of the current wallpaper and set that color to a layout on my widget?

我正在尝试的示例要做:

An example of what I'm trying to do:

这是对AccuWeather:

This is a setting on AccuWeather:

推荐答案

您可以使用 WallpaperManager。在API 27中添加的getWallpaperColors

这篇关于从墙纸获得色彩? -安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆