Application Components(应用的构成)

前端之家收集整理的这篇文章主要介绍了Application Components(应用的构成)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

A view hierarchy is placed within an activity's window by the Activity.setContentView() method. The content view is the View object at the root of the hierarchy. (See the separate User Interface document for more information on views and the hierarchy.)

The content view is the View object at the root of the hierarchy. 这句话如果是真的,比较重要。

Broadcast receivers do not display a user interface. However,they may start an activity in response to the information they receive,or they may use the NotificationManager to alert the user.

Notifications can get the user's attention in varIoUs ways — flashing the backlight,vibrating the device,playing a sound,and so on. They typically place a persistent icon in the status bar,which users can open to get the message.

收到消息有可能会用NotificationManager通知提示使用者,或者像之前用的toast也可以。NotificationManager 可以有很多提示使用者的方法,看上面可以知道。

Content providers
A content provider makes a specific set of the application's data available to other applications. The data can be stored in the file system,in an sqlite database,or in any other manner that makes sense. The content provider extends the ContentProvider base class to implement a standard set of methods that enable other applications to retrieve and store data of the type it controls. However,applications do not call these methods directly. Rather they use a ContentResolver object and call its methods instead. A ContentResolver can talk to any content provider; it cooperates with the provider to manage any interprocess communication that's involved.

provider管理的数据不只是在sqlite里面的,文件系统里面的也。应用要使用数据,要用ContentResolver object ,进程间的,也用它,比如访问其他应用的数据。

猜你在找的Sqlite相关文章