用户登录
用户注册

分享至

从壁纸中获取颜色?- 安卓

  • 作者: iiikeaaaa
  • 来源: 51数据库
  • 2022-11-14

问题描述

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

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.getWallpaperColors 在 API 27 中添加

You can use WallpaperManager.getWallpaperColors that was added in API 27

软件
前端设计
程序设计
Java相关