当前位置:网站首页>Custom view puzzle getcolor r.color The color obtained by colorprimary is incorrect
Custom view puzzle getcolor r.color The color obtained by colorprimary is incorrect
2022-07-06 12:09:00 【ScottePerk】
In the custom View When , You can get... Through the following code colorPrimary The color of the . But the obtained color seems to be different .
mPrimaryColor=ContextCompat.getColor(getContext(),R.color.colorPrimary);
For example, below :
This is a custom circular progress bar , The color of the bottom ring and ToolBar The color looks different to the naked eye . But the colors I set are colorPrimary, And I haven't customized this color .
in fact , The color of these two places is the same , It looks different just because of illusion .
It looks different just because of illusion !!!
It looks different just because of illusion !!!
If you use a color picker to get the colors of these two places , You will find that the color is the same !!! The angle you see , Color next to color , Will give the human eye an illusion .
边栏推荐
猜你喜欢
随机推荐
STM32 如何定位导致发生 hard fault 的代码段
VSCode基础配置
ESP学习问题记录
Arduino gets the length of the array
R & D thinking 01 ----- classic of embedded intelligent product development process
Pytoch implements simple linear regression demo
Variable parameter principle of C language function: VA_ start、va_ Arg and VA_ end
ESP8266使用arduino连接阿里云物联网
锂电池基础知识
RT thread API reference manual
Mysql database interview questions
Kconfig Kbuild
Machine learning -- linear regression (sklearn)
Kaggle竞赛-Two Sigma Connect: Rental Listing Inquiries
Several declarations about pointers [C language]
【ESP32学习-2】esp32地址映射
C语言回调函数【C语言】
Linux Yum install MySQL
AMBA、AHB、APB、AXI的理解
Detailed explanation of 5g working principle (explanation & illustration)