Android 设计思想
2010-06-17 03:29:00 来源:WEB开发网One potential gotcha here is that it’s very easy to fall into this trap if you’re using the emulator, since the emulator uses your desktop computer’s network connection. That’s almost guaranteed to be much faster than a cell network, so you’ll want to change the settings on the emulator that simulate slower network speeds. You can do this in Eclipse, in the “Emulator Settings” tab of your launch configuration or via a command line option when starting the emulator.
Different Keystrokes for Different Folks
Android will support a variety of handset form-factors. That’s a fancy way of saying that some Android devices will have full “QWERTY” keyboards, while others will have 40-key, 12-key, or even other key configurations. Similarly, some devices will have touch-screens, but many won’t.
When building your applications, keep that in mind. Don’t make assumptions about specific keyboard layouts — unless, of course, you’re really interested in restricting your application so that it can only be used on those devices.
Don’t Assault the Battery
A wireless device isn’t very wireless if it’s constantly plugged into the wall. Handheld devices are battery-powered, and the longer we can make that battery last on a charge, the happier everyone is — especially the user. Two of the biggest consumers of battery power are the processor, and the radio; that’s why it’s important to write your applications to do as little work as possible, and use the network as infrequently as possible.
Minimizing the amount of processor time your application uses really comes down to writing efficient code. To minimize the power drain from using the
更多精彩
赞助商链接