Comment: function keys of Android phones

Source: Internet
Author: User

In addition to the numeric keypad, traditional mobile phones also have many function keys, such as the call key, the phone key, the OK key, the cancel key, and the direction key. In the new era, some smartphones continue this tradition, represented by Android phones.

Since the advent of G1, there have been tens of millions of Android phones, varied and varied. Some have a hard keyboard and some have only three keys. After several years of development, hard keys have been gradually eliminated. Currently, mainstream Android phones only have three to five external hard keys, some of which must be: menu keys, the Home Key and back key, and some include the trackball and search keys.

The following describes the advantages and disadvantages of these buttons:

The most useless key: Search

Cause: search is important, but there is a search widget on the home, and there are search items in the menu of each application. Therefore, the external search key is rarely used, so many manufacturers' models do not have this key.

The most boring key: trackball is also of little practical value. The focus of rolling is confusing, and the focus control during development is even more painful for developers. In theory, it should work with the middle wheel of the mouse, but the result is completely the opposite. The menu key in Android is more practical and convenient to use. It is equivalent to the menu bar in PC software, which is used to switch, operate, and configure different tasks. Another function is to press the menu key to pop up or hide the softkeyboard. The Home Key is very important for all smartphones that support multiple tasks. Without the Home key, the mobile phone cannot count as multiple tasks. Therefore, the iPhone is the most popular, the iPad also has the Home Key. With the Home key, you can jump to the home page at any time to enable another application.
For Android, pressing the Home key will go to the launcher home page, and the current program will be in the pause status, but the current program is still running and the status will be saved, the pop-up dialog box (implemented by DIALOG) and progress bar are saved. the pop-up menu will be restored when it enters the dialog box again, but the pop-up menu will not be saved, for example, if you press the menu to pop up or long press the context menu, it will not be saved when you enter the menu again. It is also very helpful to long press home. It lists the list of recently opened tasks (not the Application List), and you can click to jump. Some models also support double-click home, which is different from iPhone/iPad. Instead of listing recently opened applications, you can open applications that a user can set. The back key focuses on the back key. It has several functions: one is to exit the current page and return to the previous page; the other is to cancel the dialog box and progress bar. Long press it to start the browser (the magic hidden function ). However, the back key is very confusing:
  1. It can only exit the current page, but cannot exit the current application

The default activity action is to press back and finish () to drop the activity, that is, to kill the current activity, and return the previous activity. But for an application, it does not necessarily exit because the application will always exist until all its components exit. If the application contains services, broadcastreceiver, and other components whose lifecycles are not affected by keys, the application process will still run in the background even if all the foreground activity components are back. In addition, the program can also handle the back key by itself, and then return to the previous page (such as the browser and MMS provided by the system) without killing the front-end page instance ). To sum up, back can only exit visible components on the foreground, but cannot exit the application.

  1. It can Dismiss the dialog box, but does not trigger a listener event.

For example, if there is a dialog box with two buttons okay and cancel, pressing back in the displayed dialog box will dismiss the dialog box, but will not trigger any onclicklistener in okay and cancel. Therefore, for some applications with a prompt dialog box on the exit front-end page, such as Renren and press back, a dialog box is displayed asking whether to exit. If you press back, the dialog box is dismiss, continue to the previous page, press back, And the dialog box is displayed, and then the back and dismiss dialog boxes are displayed. That is to say, it is funny to press back and never quit these applications.

  1. It can Dismiss the progress bar, but does not terminate the operation.

When the application performs some time-consuming operations, the application displays a progress bar or a significant progress (x %), but there is still no progress (only the circle is in turn), and presses BACK, the progress bar disappears. in the user's understanding, the operation should be aborted, but this is not the case. BACK only Dismiss the progress bar, but cannot stop the operation. Of course, this also lies in the implementation method of the program, if the ProgressDialog. setCancellable (false), the BACK cannot Dismiss the progress bar, that is, the operation "looks" will not be aborted; but if you really want to stop the operation during the Dismiss progress bar, then do more processing, such as Handle.
BACK events. The BACK key does not bring much convenience to users, because many applications (especially those transplanted from the iPhone) have built-in buttons for returning the previous page. BACK is used in the Task stack. The exit of a smartphone depends on the application itself to set a special exit button or menu. Otherwise, you will not be able to exit. You can only use third-party applications to kill processes, as discussed in this article.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.