class MyPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
var paint = Paint()
…isAntiAlias = true
…strokeWidth = 1.0
…style = PaintingStyle.fill
…color = Colors.green
…invertColors = false;
canvas.drawCircle(Offset(size.width/2, size.height/2), size.width/2, paint);
}
//在实际场景中正确利用此回调可以避免重绘开销,本示例我们简单的返回true
@override
bool shouldRepaint(CustomPainter oldDelegate) => true;
}
class MyPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
var paint = Paint()
…isAntiAlias = true
…strokeWidth = 1.0
…style = PaintingStyle.fill
…color = Colors.green
…invertColors = false;
canvas.drawCircle(Offset(size.width/2, size.height/2), size.width/2, paint);
canvas.drawCircle(Offset(size.width/2, size.height/2), size.width/2.5, paint…color=Colors.red);
canvas.drawCircle(Offset(size.width/2, size.height/2), size.width/4, paint…color=Colors.deepPurpleAccent);
}
//在实际场景中正确利用此回调可以避免重绘开销,本示例我们简单的返回true
@override
bool shouldRepaint(CustomPainter oldDelegate) => true;
}
class MyPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
var paint = Paint()
…isAntiAlias = true
…strokeWidth = 1.0
…style = PaintingStyle.fill
…color = Colors.green
…invertColors = false;
canvas.drawCircle(Offset(size.width/2, size.height/6), size.width/6, paint);
canvas.drawCircle(Offset(size.width/2, size.height/6*1.4), size.width/6, paint…color=Colors.deepPurpleAccent);
canvas.drawCircle(Offset(size.width/2, size.height/6*1.8), size.width/6, paint…color=Colors.deepOrange);
canvas.drawCircle(Offset(size.width/2, size.height/6*2.2), size.width/6, paint…color=Colors.amber);
canvas.drawCircle(Offset(size.width/2, size.height/6*2.6), size.width/6, paint…color=Colors.blue);
canvas.drawCircle(Offset(size.width/2, size.height/6*3.0), size.width/6, paint…color=Colors.purple);
}
//在实际场景中正确利用此回调可以避免重绘开销,本示例我们简单的返回true
@override
bool shouldRepaint(CustomPainter oldDelegate) => true;
}
class MyPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
var paint = Paint()
…isAntiAlias = true
…strokeWidth = 1.0
…style = PaintingStyle.fill
…color = Colors.red
…invertColors = false;
canvas.drawCircle(Offset(size.width/2, size.height/6), size.width/6, paint…color=Colors.red.withOpacity(0.1));
canvas.drawCircle(Offset(size.width/2, size.height/6*1.4), size.width/6, paint…color=Colors.red.withOpacity(0.14));
canvas.drawCircle(Offset(size.width/2, size.height/6*1.8), size.width/6, paint…color=Colors.red.withOpacity(0.18));
canvas.drawCircle(Offset(size.width/2, size.height/6*2.2), size.width/6, paint…color=Colors.red.withOpacity(0.22));
canvas.drawCircle(Offset(size.width/2, size.height/6*2.6), size.width/6, paint…color=Colors.red.withOpacity(0.26));
canvas.drawCircle(Offset(size.width/2, size.height/6*3.0), size.width/6, paint…color=Colors.red.withOpacity(0.30));
canvas.drawCircle(Offset(size.width/2, size.height/6*3.0), size.width/6, paint…color=Colors.red.withOpacity(0.34));
canvas.drawCircle(Offset(size.width/2, size.height/6*3.0), size.width/6, paint…color=Colors.red.withOpacity(0.38));
canvas.drawCircle(Offset(size.width/2, size.height/6*3.0), size.width/6, paint…color=Colors.red.withOpacity(0.42));
canvas.drawCircle(Offset(size.width/2, size.height/6*3.0), size.width/6, paint…color=Colors.red.withOpacity(0.46));
canvas.drawCircle(Offset(size.width/2, size.height/6*3.0), size.width/6, paint…color=Colors.red.withOpacity(0.46));
}
//在实际场景中正确利用此回调可以避免重绘开销,本示例我们简单的返回true
@override
bool shouldRepaint(CustomPainter oldDelegate) => true;
}
PaintingStyle.fill(用画笔绘制边框)
class MyPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
var paint = Paint()
…isAntiAlias = true
…strokeWidth = 1.0
…style = PaintingStyle.stroke
…color = Colors.green
…invertColors = false;
canvas.drawCircle(Offset(size.width/2, size.height/2), size.width/2, paint);
}
//在实际场景中正确利用此回调可以避免重绘开销,本示例我们简单的返回true
@override
bool shouldRepaint(CustomPainter oldDelegate) => true;
}
class MyPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
var paint = Paint()
…isAntiAlias = true
…strokeWidth = 1.0
…style = PaintingStyle.stroke
…color = Colors.green
…invertColors = false;
canvas.drawCircle(Offset(size.width/2, size.height/2), size.width/2, paint);
canvas.drawCircle(Offset(size.width/2, size.height/2), size.width/2.5, paint…color=Colors.red);
canvas.drawCircle(Offset(size.width/2, size.height/2), size.width/4, paint…color=Colors.deepPurpleAccent);
}
//在实际场景中正确利用此回调可以避免重绘开销,本示例我们简单的返回true
@override
bool shouldRepaint(CustomPainter oldDelegate) => true;
}
class MyPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
var paint = Paint()
…isAntiAlias = true
…strokeWidth = 1.0
…style = PaintingStyle.stroke
…color = Colors.green
…invertColors = false;
canvas.drawCircle(Offset(size.width/2, size.height/6), size.width/6, paint);
canvas.drawCircle(Offset(size.width/2, size.height/6*1.4), size.width/6, paint…color=Colors.deepPurpleAccent);
canvas.drawCircle(Offset(size.width/2, size.height/6*1.8), size.width/6, paint…color=Colors.deepOrange);
canvas.drawCircle(Offset(size.width/2, size.height/6*2.2), size.width/6, paint…color=Colors.amber);
canvas.drawCircle(Offset(size.width/2, size.height/6*2.6), size.width/6, paint…color=Colors.blue);
canvas.drawCircle(Offset(size.width/2, size.height/6*3.0), size.width/6, paint…color=Colors.purple);
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数初中级Android工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则近万的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Android移动开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!
如果你觉得这些内容对你有帮助,可以扫码获取!!(备注:Android)
![](https://i-blog.csdnimg.cn/blog_migrate/54a154f9efd125224b51c17cfaf289f4.jpeg)
总结
Android架构学习进阶是一条漫长而艰苦的道路,不能靠一时激情,更不是熬几天几夜就能学好的,必须养成平时努力学习的习惯。所以:贵在坚持!
上面分享的字节跳动公司2021年的面试真题解析大全,笔者还把一线互联网企业主流面试技术要点整理成了视频和PDF(实际上比预期多花了不少精力),包含知识脉络 + 诸多细节。
【Android高级架构视频学习资源】
Android部分精讲视频领取学习后更加是如虎添翼!进军BATJ大厂等(备战)!现在都说互联网寒冬,其实无非就是你上错了车,且穿的少(技能),要是你上对车,自身技术能力够强,公司换掉的代价大,怎么可能会被裁掉,都是淘汰末端的业务Curd而已!现如今市场上初级程序员泛滥,这套教程针对Android开发工程师1-6年的人员、正处于瓶颈期,想要年后突破自己涨薪的,进阶Android中高级、架构师对你更是如鱼得水,赶快领取吧!
《互联网大厂面试真题解析、进阶开发核心学习笔记、全套讲解视频、实战项目源码讲义》点击传送门即可获取!
P-1713312304973)]
【Android高级架构视频学习资源】
Android部分精讲视频领取学习后更加是如虎添翼!进军BATJ大厂等(备战)!现在都说互联网寒冬,其实无非就是你上错了车,且穿的少(技能),要是你上对车,自身技术能力够强,公司换掉的代价大,怎么可能会被裁掉,都是淘汰末端的业务Curd而已!现如今市场上初级程序员泛滥,这套教程针对Android开发工程师1-6年的人员、正处于瓶颈期,想要年后突破自己涨薪的,进阶Android中高级、架构师对你更是如鱼得水,赶快领取吧!
《互联网大厂面试真题解析、进阶开发核心学习笔记、全套讲解视频、实战项目源码讲义》点击传送门即可获取!