Heim > Artikel > Web-Frontend > 请问这样的界面是如何实现的?
<code class="language-java"><span class="n">Path</span> <span class="n">path</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Path</span><span class="o">();</span>
<span class="n">path</span><span class="o">.</span><span class="na">moveTo</span><span class="o">(</span><span class="n">left</span><span class="o">,</span> <span class="n">top</span><span class="o">);</span>
<span class="n">path</span><span class="o">.</span><span class="na">lineTo</span><span class="o">(</span><span class="n">right</span><span class="o">-</span><span class="n">radius</span><span class="o">,</span> <span class="n">top</span><span class="o">);</span>
<span class="n">path</span><span class="o">.</span><span class="na">quadTo</span><span class="o">(</span><span class="n">right</span><span class="o">,</span><span class="n">top</span><span class="o">,</span><span class="n">right</span><span class="o">,</span> <span class="n">top</span><span class="o">+</span><span class="n">radius</span><span class="o">);</span>
</code>
我写过一个控件lzyzsd/CircleProgress · GitHub
我怎么觉得这种界面的难点在美工,配色等方面。一般纯程序员搞出来的总有股子山寨气息,就是配色和美工搞不好。。。
大半夜更新。。。( •̀∀•́ )<code class="language-java"><span class="kd">public</span> <span class="kt">void</span> <span class="nf">drawArc</span> <span class="o">(</span><span class="n">RectF</span> <span class="n">oval</span><span class="o">,</span> <span class="kt">float</span> <span class="n">startAngle</span><span class="o">,</span> <span class="kt">float</span> <span class="n">sweepAngle</span><span class="o">,</span> <span class="kt">boolean</span> <span class="n">useCenter</span><span class="o">,</span> <span class="n">Paint</span> <span class="n">paint</span><span class="o">)</span>
</code>
circleprogress