freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

應(yīng)用程序基礎(chǔ)外文翻譯-其他專業(yè)-資料下載頁

2025-01-19 11:09本頁面

【導(dǎo)讀】Android應(yīng)用程序使用Java編程語言開發(fā)。aapt工具把編譯后的Java代碼連同應(yīng)用程序所。需的其他數(shù)據(jù)和資源文件一起打包到一個(gè)Android包文件中,這個(gè)文件使用.apk作為擴(kuò)展名。此文件是分發(fā)并安裝應(yīng)用程序到移動(dòng)設(shè)備的載體;是用戶下載到他們的設(shè)備的文件。1默認(rèn)情況下,每個(gè)應(yīng)用程序均運(yùn)行于它自己的Linux進(jìn)程中。源時(shí),則關(guān)閉這個(gè)進(jìn)程。Android應(yīng)用程序并沒有為應(yīng)用程序提供一個(gè)單獨(dú)的入口點(diǎn),activity是為用戶操作而展示的可視化用戶界面。以及翻閱以前的短信或改變?cè)O(shè)置的其他activity。面,但其中每個(gè)activity都不其它的保持獨(dú)立。每個(gè)activity的作用,以及有多少個(gè)activity,當(dāng)然是取決于應(yīng)用程序及其設(shè)計(jì)的。activity轉(zhuǎn)向另一個(gè)靠的是用當(dāng)前的activity啟動(dòng)下一個(gè)。每個(gè)activity都被給予一個(gè)默認(rèn)的窗口以進(jìn)行繪制。view層次結(jié)構(gòu)是由()方法放入activity的窗口之中的。提供給需要這個(gè)運(yùn)算結(jié)果的activity使用。系統(tǒng)將在這個(gè)activity不再顯示于屏幕乀后,仍維持音樂播放service的運(yùn)行。然而,它們可以啟動(dòng)一個(gè)activity來響應(yīng)它們收到。的圖標(biāo),用戶可以打開它并獲取消息。

  

【正文】 f the service is not already running, bindService() can optionally start it.) For example, an activity might establish a connection with the music playback service mentioned earlier so that it can provide the user with the means (a user interface) for controlling the playback. The activity would call bindService() to set up that connection, and then call methods defined by the service to affect the playback. A later section, Remote procedure calls, has more details about binding to a service. 3. An application can initiate a broadcast by passing an Intent object to methods like (), (), and () in any of their variations. Android delivers the intent to all interested broadcast receivers by calling their onReceive() methods. For more on intent messages, see the separate article, Intents and Intent Filters. Shutting down ponents A content provider is active only while it39。s responding to a request from a ContentResolver. And a broadcast receiver is active only while it39。s responding to a broadcast message. So there39。s no need to explicitly shut down these ponents. Activities, on the other hand, provide the user interface. They39。re in a longrunning conversation with the user and may remain active, even when idle, as long as the conversation continues. Similarly, services may also remain running for a long time. So Android has methods to shut down activities and services in an orderly way: 1. An activity can be shut down by calling its finish() method. One activity can shut down another activity (one it started with startActivityForResult()) by calling finishActivity(). 2. A service can be stopped by calling its stopSelf() method, or by calling (). Components might also be shut down by the system when they are no longer being 11 used or when Android must reclaim memory for more active ponents. A later section, Component Lifecycles, discusses this possibility and its ramifications in more detail. The manifest file Before Android can start an application ponent, it must learn that the ponent exists. Therefore, applications declare their ponents in a manifest file that39。s bundled into the Android package, the .apk file that also holds the application39。s code, files, and resources. The manifest is a structured XML file and is always named for all applications. It does a number of things in addition to declaring the application39。s ponents, such as naming any libraries the application needs to be linked against (besides the default Android library) and identifying any permissions the application expects to be granted. But the principal task of the manifest is to inform Android about the application39。s ponents. For example, an activity might be declared as follows: The other ponents are declared in a similar way — service elements for services, receiver elements for broadcast receivers, and provider elements for content providers. Activities, services, and content providers that are not declared in the manifest are not visible to the system and are consequently never run. However, broadcast receivers can either be declared in the manifest, or they can be created dynamically in code (as BroadcastReceiver objects) and registered with the system by calling (). For more on how to structure a manifest file for your application, see The Android File. Intent filters An Intent object can explicitly name a target ponent. If it does, Android finds that ponent (based on the declarations in the manifest file) and activates it. But if a target is not explicitly named, Android must locate the best ponent to respond to the intent. It does so by paring the Intent object to the intent filters of potential targets. A ponent39。s intent filters inform Android of the kinds of intents the ponent is able to handle. Like other essential information about the ponent, they39。re declared in the manifest file. A ponent can have any number of intent filters, each one declaring a different set of capabilities. If it doesn39。t have any filters, it can be activated only by intents that explicitly name the ponent as the target. For a broadcast receiver that39。s created and registered in code, the intent filter is instantiated directly as an IntentFilter object. All other filters are set up in the manifest. For more on intent filters, see a separate document, Intents and Intent Filters.
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1