Android的 - 与画线条渐变 [英] Android - Draw lines with Gradient

查看:1122
本文介绍了Android的 - 与画线条渐变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从绘制点线,渐变点。一切使用它们之间的圆形盖看起来不错我。问题是,帽只有一种颜色。有可能单独画他们或迫使图纸做是正确的?

I drawing a lines from point to point with gradient. To everything looks nice I using rounded caps between them. Problem is that caps are only in one colour. There is possibility to paint them separately or force drawing to do it right?

或者,也许只是绘制它们之间的点?

Or maybe just draw a dot between them?

我找到了解决办法。
就像我写之前,我只是要去画线之间我自己点,并把那里我需要的任何颜色。

I found solution. Like I write before I just gonna draw my own Points between the lines and put there whatever colour I need.

推荐答案

您应该使用 GradientDrawable 造型,

文件:的http://developer.android.com/reference/android/graphics/drawable/GradientDrawable.html

这篇关于Android的 - 与画线条渐变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆