Heaven Zhuhai Branch Rudder note : Originally this series is to prepare a book, details please see the earlier blog "to seek partners to write the deep understanding of Monkeyrunner" books. But for many reasons, there is no wish. So the draft is shared here, so mistakes are unavoidable. If necessary, please refer to the following, the forwarding of the word also keep the end of each article source and other information.
The script-related examples in this book often use the Android SDK's Notepad application, so it's important to describe the application. The best way to get familiar with this app is to install it on your target Android, and then play it yourself. Because it's just an example application, the functionality is not complex.
NotePad source location can be found in your SDK directory, such as in my machine is "/users/apple/develop/sdk/samples/android-19/legacy/notepad", Everyone can compile and install themselves, here will not give steps, if you have unclear please go to Baidu Bar. If you feel that you compile more trouble, you can go to the Internet to download a notepad apk file directly, and then directly installed. Here to slightly explain that the different versions of the source code compiled by the notepad.apk may slightly a little bit different, but we use the main features are similar, so you do not need to specifically find a specific version of the APK to install.
After installation, you can find the corresponding Notepad icon on your Android machine as follows:
?
Once we find the icon for the Notepad app, we can click to open it and get familiar with its function. In general, the role of this sample app is a journaling app that allows users to add, modify, and delete diaries from the app. The application consists of several modules:
- noteslist Activity: Lists all the diary's interfaces. At the same time, this is also the main interface of Notepad, people click the Notepad application icon will enter the interface
- noteeditor Activity: Diary Add or Edit interface. Users can enter this interface to add a diary, but also can edit the existing diary
- titleeditor Activity: journal header modification Interface. User can enter this interface to change the journal title
- context Menu: A long press of a journal item in the Noteslist interface pops up a context menu and provides multiple options for the user to select, and the user can perform multiple actions on the journal through the context menu
- system MenuOption menu: The user presses your Android phone's system menu physical key will pop up the system menu option, in different interface will provide different options function help group people to operate the diary
We will describe these modules at the beginning of the next section.
Heaven Zhuhai Branch Rudder
Public number:Techgogogo
Weibo: Http://weibo.com/techgogogo
Csdn:http://blog.csdn.net/zhubaitian
2nd Chapter 1 "Monkeyrunner Source analysis" Know your test object: Notepad application Introduction (original)