当前位置:网站首页>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 .
边栏推荐
- RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED
- RuntimeError: cuDNN error: CUDNN_ STATUS_ NOT_ INITIALIZED
- 数据分析之缺失值填充(重点讲解多重插值法Miceforest)
- 機器學習--線性回歸(sklearn)
- Fashion Gen: the general fashion dataset and challenge paper interpretation & dataset introduction
- ToggleButton实现一个开关灯的效果
- Dead loop in FreeRTOS task function
- Gallery之图片浏览、组件学习
- 锂电池基础知识
- arduino获取数组的长度
猜你喜欢
随机推荐
ES6语法总结--下篇(进阶篇 ES6~ES11)
FreeRTOS 任务函数里面的死循环
Imgcat usage experience
5G工作原理详解(解释&图解)
C语言函数之可变参数原理:va_start、va_arg及va_end
GNN的第一个简单案例:Cora分类
Togglebutton realizes the effect of switching lights
Some concepts often asked in database interview
ESP学习问题记录
XML file explanation: what is XML, XML configuration file, XML data file, XML file parsing tutorial
ESP8266通过Arduino IDE连接Onenet云平台(MQTT)
MySQL realizes read-write separation
Distribute wxWidgets application
Implementation scheme of distributed transaction
Dependency in dependencymanagement cannot be downloaded and red is reported
高通&MTK&麒麟 手機平臺USB3.0方案對比
Embedded startup process
AMBA、AHB、APB、AXI的理解
Analysis of charging architecture of glory magic 3pro
互聯網協議詳解









