AlertDialog.Builder 与扩展 AlertDialog 的类 - 应用程序大小
我试图找出创建对话框的最佳方法。我可以创建自己的 Dialog 类(对我来说,它更加干净和有组织),或者我可以使用 AlertDialog.Builder (它将内联完成,并且看起来很时髦)...两者的优点和缺点是什么执行?我唯一能想到的是应用程序的大小......
I am trying to figure out what is the best way to go about creating dialogs. I can either create my own Dialog class (which, to me, is more clean and organized), or I can use AlertDialog.Builder (which would be done inline, and funky looking)... What are the positivies and negatives of either implementation? The only thing I can think of is application size...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
作为个人选择的问题,我会选择
AlertDialog.Builder
,如果有一个例程可供我使用,我不想重新发明轮子。我不能说两者之间的应用程序大小有何不同,但如果是的话,我确信这并不是一个巨大的差异。看起来您可能更喜欢创建自己的自定义类来扩展
AlertDialog
,所以我会朝这个方向发展。As a matter of personal choice, I would go with
AlertDialog.Builder
, if there is a routine at my disposal I wouldn't want to reinvent the wheel.I cannoy say how the application size is different between the two, but if it is, I am sure it is not a drastic difference. By how it seems you might have a preference as to create your own custom class that extends to
AlertDialog
so I would go in that direction.