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

正文內容

外文翻譯---應用程序基礎androiddevelopers-android(完整版)

2025-07-11 09:50上一頁面

下一頁面
  

【正文】 d another application has developed a suitable scroller and made it available to others, you can call upon that scroller to do the work, rather than develop your own. Your application doesn39。長春理工大學光電信息學院畢業(yè)設計 1 Application Fundamentals Android applications are written in the Java programming language. The piled Java code — along with any data and resource files required by the application — is bundled by the aapt tool into an Android package, an archive file marked by an .apk suffix. This file is the vehicle for distributing the application and installing it on mobile devices。t incorporate the code of the other application or link to it. Rather, it simply starts up that piece of the other application when the need arises. For this to work, the system must be able to start an application process when any part of it is needed, and instantiate the Java objects for that part. Therefore, unlike applications on most other systems, Android applications don39。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 長春理工大學光電信息學院畢業(yè)設計 4 message. Content providers A content provider makes a specific set of the application39。s passed to the calling activity39。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。 aapt 工具把編譯后的 Java 代碼連同應用程序所需的其他數(shù)據(jù)和資源文件一起打包到一個 Android 包文件中,這個文件使用 .apk作為擴展名。例如,如果你的應用程序需要顯示一個圖片卷動列表,而另一個應用程序已經(jīng)開發(fā)了一個合用的而又允許別的應用程序使用的話,你可以直接調用那個卷動列表來完成工作,而不用自己再開發(fā)一個。盡管它們一起組成了一個內聚的用戶界面,但其中每個 activity都不其它的保持獨立。一個 activity也可以使用附加窗口 ——例如,一個在 activity運行過程中彈出的供用戶響應的對話框,戒是一個當用戶選擇了屏幕上特定項目后顯示的必要信息的窗口。 view 層次結構是由 () 方法放入 activity的窗口之中的。然而,音樂播放這個任務本身丌應該由任何 activity來處理,因為用戶期望即使在他們離開播放器應用程序而開始做別的事情時,音樂仍在繼續(xù)播放。參見稍后的進程和線程。通知可以用多種方式來吸引用戶的注意力──閃動背光燈、震動設備、播放聲音等等。 每當出現(xiàn)一個需要被特定組件處理的請求時, Android 會確保那個組件的應用程序進程處于運行狀態(tài),必要時會啟動它,并確保那個組件的一個合適的實例可用,必要時會創(chuàng)建那個實例。 對于每種組件來說,激活的方法是不同的: 1 通過傳遞一()(以啟動(或指定新工作給)一個 activity。 Android 調用此 service 的 onStart()方法并將Intent 對象傳遞給它。 關閉組件 content provider 僅在響應來自 ContentResolver 的請求時處于活動狀態(tài)。一個 activity可 以通過調用finishActivity()方法來關閉另外一個 activity(它用 startActivityForResult() 啟動的)。 但 manifest 文件最重要的任務是向 Android 報告此應用程序的各個組件。但如果 intent 沒 有顯式地指定一個目標, Android 就必須找到最合適的組件來響應此 intent。 一個組件可以擁有任意數(shù)量的 intent 過濾器,每個都聲明了一套不同的功能。 對于在代碼中創(chuàng)建并注冊的 broadcast receiver 來說, intent 過濾器將被直接實例化 IntentFilter 為對象。組件的 intent 過濾器會通知 Android 它所能處理的 intent 類型。 icon和 label屬性指向包含展示給用戶的此 activity的圖標和標簽的資源文件。 系統(tǒng)也會在組件不再被使用的時候戒者當 Android必須為更多的活動組件回收內存時關閉它。所以沒有必要去顯式地關閉返些組件。此 service 會通過 onBind() 方法的調用來獲取此 Intent 對象(如果此 service 尚未運行, bindService()會先啟動它)。 Android 通過調用 activity的 onNewIntent()方法來傳遞給它隨后的任何長春理工大學光電信息學院畢業(yè)設計 12 intent。而其它三種組件 ——activity、 service 和 broadcast receiver,被一種叫做 intent 的異步消息所激活。 4 Content provider content provider 將一些特定的應用程序數(shù)據(jù)供給其它應用程序使用。許多廣播是由系統(tǒng)代碼產(chǎn)生的 ——例如,通知時區(qū)改變、電池電量低、拍攝了一張照片或者用戶改變了語言選項。系統(tǒng)將在這個 activity不再顯示于屏幕乀后,仍維持音樂播放 service 的運行。(參見獨立的用戶界面文檔以獲取關于 view 及層次結構的更多信息。每個 view 均控制著窗口中一塊特定的矩形區(qū)域。 一個應用程序可以只有一個 activity,戒者,如剛才提到的短信應用程序那樣,包含很多個。它只是在有需求的時候啟動了其它應用程序的那個功能部分。單一 .apk文件中的所有代碼被認為是一個應用程序。s ponents. For example, an activity might be declared as follows: The name attribute of the activity element names the Activity subclass that implements the activity. The icon and label attributes point to resource files containing an icon and label that can be displayed to users to represent the activity. 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 長春理工大學光電信息學院畢業(yè)設計 7 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 onStart() method
點擊復制文檔內容
畢業(yè)設計相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1