Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前,我的表面视图上有一个静态的纯蓝色背景色,我想知道一种方法来垂直获得从深蓝色到浅蓝色的蓝色渐变。目前我这样设置背景颜色
canvas.drawRGB(15,03,175);
任何提示或建议将不胜感激,谢谢。
以油漆的设置着色器的形式找到了我的答案,这目前很好用
Paint gradPaint = new Paint(); gradPaint.setShader(new LinearGradient(0,0,0,getHeight(),Color.BLUE,Color.CYAN,Shader.TileMode.CLAMP)); canvas.drawPaint(gradPaint); //Where getHeight() is the height of the canvas
我有一个如下所示的表格。
<table> <tr> <td class="selected plus"><a>+</a></td> <td><a class="minus">-</a></td> </tr> </table&g