[問題] 新手發問
Which level: (app/frmwrk/lib/kernel)
Question:
Input:
Expected Output:
Wrong Output:
Code: (請多利用置底文網站)
References: (Books/Websites/...)
Supplement:
小弟最近自學於Android上開發,常常遇到需要傳遞Context類別參數傳遞,
對於Context類別敘述原文如下 :
Class Overview
Interface to global information about an application environment.
This is an abstract class whose implementation is provided by
the Android system. It allows access to application-specific
resources and classes, as well as up-calls for application-level
operations such as launching activities, broadcasting and
receiving intents, etc
依小弟認知,他是指這類別靠Android系統實現,去允許存取特殊應用的資源跟類別,
要求應用層級操作,如啟動activities、broadcasting和接收intents等,但是
還是有點難以理解,是否有人可以白話一點解釋Context的作用?
另外,傳遞Context context這種參數時(如PendingIntent.getActivity
(Context context, int requestCode, Intent intent, int flags)
...等等)為什麼可以用this傳遞?
謝謝大家~~
PS:我是幫朋友PO的,若高手有見解再請回覆到以下mail
yashote2003@yahoo.com.tw
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.38.11.33
推
01/13 02:03, , 1F
01/13 02:03, 1F
→
01/13 02:03, , 2F
01/13 02:03, 2F
→
01/13 02:05, , 3F
01/13 02:05, 3F
→
01/13 02:06, , 4F
01/13 02:06, 4F
推
01/13 12:48, , 5F
01/13 12:48, 5F
討論串 (同標題文章)
AndroidDev 近期熱門文章
PTT數位生活區 即時熱門文章