Comments (2)
我直接 在draw 的paint 增加属性 alpha(122),阴影是柔和了 但是 会影响本身的视图,刚看没多久代码,我是有一点疑问,为什么您要设置在布局内作管理 而不是单纯给单一控件添加即可。。。
from ashadow2.
你好,将ShadowColor设置成带有透明度颜色即可,比如:#80000000;使用内存的原因是因为内部使用了bitmap暂存阴影效果,如果每个视图都独自使用,则可能会非常消耗内存。大部分项目,阴影都是一样的,因此做缓存进行复用非常值得。其实可以不用bitmap先缓存阴影效果,可以直接缓存,但那样就会出现很大的性能消耗。并且view必须关闭硬件加速才行。综合以上,采用了bitmap缓存加上bitmap公用(其实是.9图) @HMZhhh
from ashadow2.
Related Issues (6)
- 上下左右四个角有黑色弧线 HOT 1
- 布局预览问题 HOT 1
- 想了解关于兼容性方面,大佬现在能适配的版本范围是多少 HOT 1
- 引用不到 HOT 2
- 支持内阴影吗 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ashadow2.