哪里可以获得简单的 Android 程序来说明生命周期?
我正在关注 Ed Burnette 的“hello-android-introducing-googles-mobil…”,这对于基础知识非常有用。此外,使用基础知识我能够创建一个小型计算器应用程序。
但是当我想使用活动时(生命周期)我无法清楚地理解这本书。
所以请推荐一本简单地解释 Android 应用程序生命周期的书或网站 易于阅读(和锻炼)的计划
I was following "hello-android-introducing-googles-mobil… by Ed Burnette.. which was very useful for the basics. Morover using the basics I was able to create a small calculator application.
But when I wanted to work with activities(life cycle) I couldnt follow the book clearly..
So please suggest a book or site which explains the life cycle of android applications with simple
easy to read (and workout) programs
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我可以推荐两本书,但我还想推荐您应该尝试的实际实证测试。
回答你最初的问题:
Commonsware 是一个很好的来源,Mark Murphy 在 Stack Overflow 上拥有徽章信誉。
《忙碌的程序员 Android 开发指南》,来自 Commonsware.com,
我已经在第 8 页和第 3 页上取得了不错的成绩。 O'Reilly 提供的本书第 9 部分。我发现为了完全掌握 Android 生命周期,我必须阅读这些页面至少 10 遍。
Android 应用程序开发,ISBN 978-0596521479
实证测试的建议
对Android 活动进行 生命周期
创建一个 android Activity 或示例应用程序,并在每次进入 Android Lifecycle 方法之一时进行记录。如本示例所示。
将这些日志条目添加到您的活动中,然后构建它。在运行
adb logcat
的设备或模拟器上运行它。然后做一些实验。看看锁定屏幕时会发生什么,按主页,按“菜单”等。这种方法比仅仅阅读更能帮助您理解。您仍然需要阅读和研究活动生命周期,但这会有很大帮助。
I can suggest two books, but I'd also like to suggest an actual empirical test that you should try.
To answer your original question:
Commonsware is a good source and Mark Murphy has a badge cred on Stack Overflow.
The Busy Coders Guide to Android Development, from Commonsware.com
I've had good mileage on pages 8 & 9 of this book from O'Reilly. I found that in order to fully grasp the Android Life cycle I had to read these pages at least 10 times.
Android Application Development, ISBN 978-0596521479
Suggestion for empirical testing
of the Android activity lifecycle
Create an android Activity or sample app, and log each time one of the Android Lifecycle methods has been entered. As in this sample.
Add these logs entries to your activity, then build it. Run it on a device or on the emulator with
adb logcat
running. Then do some experiments. See what happens when you lock the screen,press home, press 'menu', etc. This method will help you understand than just reading. You will still need to read and study the activity lifecycle, but this will help quite a bit.
萨姆斯自学 android isbn-13: 978-0-321-67335-0
sams teach yourself android isbn-13: 978-0-321-67335-0