10年Android应用开发感想(Compose会是未来吗?)

安卓 Compose 相对传统 View 的优势 Jetpack Compose凭借声明式编程、Kotlin语法、智能重组、高效状态管理等核心优势,在开发效率、性能表现、可维护性、可测试性等方面全面超越传统View系统。尽管对于习惯传统开发模式的开发者而言,Compose存在一定学习曲线,但随着移动应用开发需求的不断升级,Compose所带来的长期价值和显著优势使其成为安卓UI开发的必然趋势,将引领安卓应用开发迈向新的高度。 阅读详情

2026.03更新:接触了2年多Compose之后,可以肯定地说,Compose确实是谷歌押注的未来,整个前端都是往声明式编程上迁移了,且不说跨平台方面,Android原生、IOS原生、Web前端,整个前端现代化编程框架都是声明式的,好处还是很多的,不在此赘述了。

很久没更新优快云博客了,不是转行了,而是实在太忙,生活/小孩/工作,中年男人的时间已经不是自己说了算。平时也是非常简单地记录一下编程的经验,算不上文章,所以转向了自己搭建的博客。由于只是简单记录一些零散代码,发出来没头没尾的,怕被喷,所以大部分文章也是自己可见。闲话扯远了,今天想聊一聊Android应用开发10+年的一些新感悟。

以下是郭霖前辈公众号转载的文章《Google 为何设计了如此难用的 ArrayMap》下一位读者的留言,实实在在戳中了我这个安卓老鸟的内心:
在这里插入图片描述

还有另外几个吐槽比较有代表性:
在这里插入图片描述
在这里插入图片描述

确实,Google负责Android API的大神们给我们Android开发者留下了太多的坑,别的不说,最基本的权限申请,已经改了无数遍,即使是推出了AndroidX和Jetpack套件,权限这一块的兼容性仍然是非常复杂,开发者苦不堪言,想说爱你真的难。

回首Android开发经历,我曾经偏爱MVP,因

安卓Compose中accompanist库使用详解 优势:Accompanist 显著简化了权限管理、复杂布局、动画过渡等场景的开发成本。注意事项:随着 Compose 版本更新,部分功能(如分页组件)可能迁移至官方库,建议定期查阅 官方迁移指南。最佳实践:通过模块化依赖管理(BoM)确保版本兼容性。通过合理使用这些库,开发者可大幅提升 Compose 开发效率,同时保持代码的简洁性与可维护性。 阅读详情

相关推荐

2024年Android JetpackCompose入门详解【附项目Demo】_android compose demo

想要全方位系统学习了解Compose, 那么这份《Jetpack Compose-从入门到精通》你一定不要错过。

2401_86372743的博客 719

2023年Android JetpackCompose入门详解【附项目Demo】_android compose demo

在去年六月底Google就大费周章号召全球开发者使用并设计Compose作品,也足见其对Compose的决心和信心。这必将是日后Androidapp极为重要的编程方式。个人认为学习JetpackCompose是必须的,因为它会成为Android主流的开发模式,那么这里给大家介绍一份谷歌大佬强势分享《JetpackCompose-从入门到精通》,手把手带大家领略Compose的风采。

2501_90336799的博客 480

Android Compose系列之:布局

本文介绍了如何使用 Jetpack Compose 构建 Android 应用的基础布局。首先,通过简化 `MainActivity.kt` 文件,展示了 Composable 函数的基本用法及其在 `setContent` 中的应用,并利用 `@Preview` 在 Android Studio 中预览界面。接着,介绍了 Compose 中的三种基本布局元素:`Column`、`Row` 和 `Box`,并通过示例说明它们的排列方式。文章还讲解了如何为 Composable 函数添加参数以增强灵活性。

m0_57989954的博客 1277

超过80%大厂都在用,Jetpack Compose现代Android界面开发的未来

Jetpack Compose是一款全新的Android UI工具包,旨在简化和改进Android应用程序的界面开发过程。与传统的XML布局文件和Java代码相比,Jetpack Compose采用了声明式的方式来构建用户界面。通过使用Kotlin编程语言,Jetpack Compose提供了一种更简洁、更直观的UI开发体验。Jetpack Compose是一个基于函数式编程模型的UI框架,它允许开发者以声明式的方式描述界面的外观和行为。

虎哥LoveDroid 3533

如何判断一个程序员的技术比你强?

技术大佬与普通程序员之间存在明显的认知差异:前者善于将复杂问题抽象为经典计算机科学问题,用声明式代码替代过程式逻辑;对异常和边界条件极度敏感,具备系统化的排查方法论;代码追求高可读性而非炫技,且执着于底层原理研究。这种技术压制体现在解决问题的确定性上——通过扎实的理论功底和工程直觉,快速定位问题本质,而非依赖试错或搜索。真正的技术实力源于对底层逻辑的深刻理解和对系统稳定性的敬畏。

wldtzzming的专栏 1088

手把手教你用Silvaco Atlas复现GaN蓝光LED仿真:从网格划分到光谱分析全流程避坑

本文详细介绍了如何使用Silvaco Atlas进行GaN蓝光LED仿真,从网格划分到光谱分析的全流程避坑指南。重点讲解了网格划分技巧、材料参数设置、极化效应处理以及结果分析方法,帮助用户快速掌握半导体器件仿真技术,提升研发效率。

weixin_42552716的博客 224

S4 Hana SD -信贷管理 - 02

在S4版本中,客户的信用管理数据在事务代码BP维护,业务伙伴角色是UKM000。在维护过程中,我们并不能直接输入信贷控制范围这个组织架构,而是需要输入一个信用段,并且在信用段的维度下去维护相应信用管理数据。对于信用段,可以分为主信用段(信用段是0000)和其他临时信用段,我们可以通过配置把次级信用段的客户信贷负债汇总到主信用段。当然,在后台也有配置,会把信用段和信贷控制范围这两者进行关联.3.2SPROIMG > 财务供应链管理 > 信用管理 > 信贷风险监视 > 主数据 > 创建信用段。

weixin_46525734的博客 1967

IoU的进化之路——IoU、GIoU、DIoU、CIoU四种损失函数总结

IoU、GIoU、DIoU、CIoU四种损失函数总结

chase 8131

微店构造订单页面,自动化抢票

之前的文章写过微店抢票如何构造订单页面分析,这篇文章在之前的基础上,进行抢票。

猫敷雪 7202

anaconda navigator 卡在loading application界面一直没有反应解决办法

在打开anaconda navigator 程序的时候,遇到了2个问题。第一个问题:打开的时候弹出提示:There is an instance of Anaconda Navigator already running.第二个问题:程序一直卡在loading application界面一直没有反应。以下是我的解决办法,有效果。

猿小白的博客 4384

【FPGA教程案例87】加解密1——基于FPGA的AES加解密算法verilog实现

DES已走到了它生命的尽头。56比特密钥实在太小,虽然三重DES可以解决密钥长度的问题,但是DES的设计主要针对硬件实现,而今在许多领域,需要用软件方法来实现它,在这种情况下,它的效率相对较低。1997年4月15日美国国家标准和技术研究所(NIST)发起征集AES(Advanced Encryption Standard)算法的活动,并成立了AES工作组。目的是为了确定一个非保密的、公开披露的、全球免费使用的加密算法,用于保护下一世纪政府的敏感信息。这里,我们对AES的基本原理进行介绍:

FPGA/MATLAB学习教程/源码/项目合作开发 2546

【QT开发教程】Qt的图形用户界面设计模式:MVC/MVP/MVVM

在Qt框架中,图形用户界面(GUI)的设计模式对于提高代码的可维护性、可扩展性和可测试性至关重要。MVC(Model-View-Controller)、MVP(Model-View-Presenter)和MVVM(Model-View-ViewModel)是常见的三种设计模式。本文将详细介绍这三种设计模式在Qt中的应用。

科技改变人类,技术成就未来 1487

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: PJSIP编译
下一篇: 使用WPF实现一个快速切换JDK版本的客户端工具
ithouse
博客等级 码龄12年 200粉丝 212原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ithouse

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值