hencoder / practicedraw1 Goto Github PK
View Code? Open in Web Editor NEW《HenCoder Android 开发进阶:UI 1-1 绘制基础》 的练习项目
Home Page: http://hencoder.com/ui-1-1
《HenCoder Android 开发进阶:UI 1-1 绘制基础》 的练习项目
Home Page: http://hencoder.com/ui-1-1
paint.drawPoints(points,2,4);
其中count 不是绘制4个点,而是4个数。
纯手打。。。。- _ -
我这种菜鸟看我教程后实现起来还是很困难, 最后一个饼图的文字和线条的位置计算完全蒙了,希望大神有空能把源码上传下,谢谢
举个栗子,饼状图 能不能提供一下具体的比率值
Lollipop 占比多少
KitKat 占比多少
Marshmallow 占比多少
话说 最后两个练习的难道是 锵锵 的上升
(不知道该在哪里说就直接提issues吧)
如果发现项目编译成功但是as不会直接安装的话(我的是3.6.3),可以尝试换成gradle4.1,对应插件版本为3.0.0.
// build.gradle
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
// gradle-wrapper
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
凯哥威武
可不可以尝试使用branch来区分这几个练习项目,就像googlesamples/android-architecture一样。将几个练习项目放到一起,查找起来也比较方便。
practice_point.xml 引入的是Practice2DrawCircleView,应该是Practice4DrawPointView
path.addArc(200, 200, 400, 400, -225, 225);
path.arcTo(400, 200, 600, 400, -180, 225, false);
path.lineTo(400, 542)
这段代码在我的理解里绘制出来的心形应该是少了左下直线部分的,但是为什么实际是一个完整的心形呢
大家都是怎么处理的?有什么技巧吗?
如题,这二个函数的直接传坐标的方法要求手机SDK版本在21以上才行,21以下的是没有效果的,要兼容低版本的话需要使用参数比较少的重载方法,先 new RectF,传入坐标,然后再将 Rectf 传入 draw 方法。这个问题在教程里没有提到,新手可能会不知道该怎么处理。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.