1、資源及引用
strings.xml
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<string name="app_name">souBook01v1</string>
</resources>
(1)java代碼中引用資源:R.string.app_name
(2)xml中使用資源:
@string/app_name
使用标示符時:@+id/<辨別符代号> eg: android:id=”@+id/ok”
2、android常用控件介紹
------文本框(TextView)
------清單(ListView)
------提示(Toast)
------編輯框(EditText)
------下拉清單(Spinner)
------自動提示(AutoCompleteTextView、MultiAutoCompleteTextView)
------日期和時間(DatePicker、TimePicker)
------按鈕(Button)
------菜單(Menu,SubMenu,MenuItem)
------對話框(Dialog)
------圖檔視圖(ImageView)
------帶圖示的按鈕(ImageButton)
------拖動效果(Gallery)
------切換圖檔(ImageSwitcher)
------網格視圖(GridView)
------文卷軸視圖(ScrollView)
------進度條(ProgressBar)
------拖動條(SeekBar)
------狀态欄提示(Notification、NotificationManager)
------對話框中的進度條(ProgressDialog)
------單項選擇(RadioGroup、RadioButton)
3、元件
Activities(活動)
Service(服務)
Content(内容)
Intent(意圖)
Broadcast Receiver(廣播接收器)
Notification(通知)
Android應用程式由一些零散的有聯系的元件組成,通過一個工程manifest綁定在一起。