# 2019/0319/Android Studio\_布局內元件&佈局規劃元件

## android app 基礎元件

### checkbox 元件

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaINciPv9dah6MokHdp%2F-LaIPJxUhBBuAYmIBu1x%2Fimage.png?alt=media\&token=3c8922b4-3df7-4f6c-ade1-e5f851c616df)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaINciPv9dah6MokHdp%2F-LaIRi9-w7qcqeLvwCHr%2Fimage.png?alt=media\&token=c6a198e5-07f9-4f2a-9d22-d421897d128d)

{% embed url="https://blog.csdn.net/sunny2come/article/details/79932159" %}

### drawable 、 drawable-v24 差別

### 使用自己的資源檔案時 android臺頭 必須刪除

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaIXEOgRdvi9Pvxa7g6%2F-LaIdeAdCpxoqb8NuAtS%2Fimage.png?alt=media\&token=841fac88-6820-4a52-a000-8b799be76c5a)

@ 用於抓取資源

### RadioButton 元件

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaIXEOgRdvi9Pvxa7g6%2F-LaInkRPXLeF0R6yYFNa%2Fimage.png?alt=media\&token=b58dfe88-9b6d-4791-a2b6-073c806a2832)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaIXEOgRdvi9Pvxa7g6%2F-LaIy-aYo6GL8A9aHC5b%2Fimage.png?alt=media\&token=2e5e0fb8-be14-42e8-8c38-2298b25f16ed)

## &#x20;使用者介面與規劃

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaIXEOgRdvi9Pvxa7g6%2F-LaJTUMmqe7s0lkoR1X9%2Fimage.png?alt=media\&token=3989c599-ffcb-43ba-8962-6afc26582d3d)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaIXEOgRdvi9Pvxa7g6%2F-LaJ6-tIZGSHMlNxI1iS%2Fimage.png?alt=media\&token=96050470-002b-4342-85d8-1392e7792585)

### linearlayout 線性布局

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaIXEOgRdvi9Pvxa7g6%2F-LaJNJ75X1n7I9kzbBYz%2Fimage.png?alt=media\&token=a770e46b-9c0b-4fe8-b509-da35a5ec83f7)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaIXEOgRdvi9Pvxa7g6%2F-LaJS185sJA1Ycrjcf6E%2Fimage.png?alt=media\&token=21331a55-344c-4e16-bc6a-eb7c71d337d6)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaIXEOgRdvi9Pvxa7g6%2F-LaJNSyG-G6lh10P1EJa%2Fimage.png?alt=media\&token=1107bb57-961a-4a5f-8a58-e9fae50e813d)

### 字串建立索引值  類似字串的函式庫

### relativelayout 相對布局

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJUyroEr_sWrVMN_zd%2F-LaJeQzqTOg7BujtQh2-%2Fimage.png?alt=media\&token=a9cb0620-ab09-40bc-a855-a66e6d0e35ae)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJUyroEr_sWrVMN_zd%2F-LaJX3eJ7Q9CbflZyii8%2Fimage.png?alt=media\&token=6af0aea7-8b73-4b8d-83b4-f4c99f8c7d21)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJUyroEr_sWrVMN_zd%2F-LaJf-J4R-s6jw4SbmPu%2Fimage.png?alt=media\&token=9422d727-92fa-4c3e-9212-17fce2aeb0a7)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJUyroEr_sWrVMN_zd%2F-LaJf6dEFS0HJrCcrLaS%2Fimage.png?alt=media\&token=18b0e428-e2db-4ad0-9d38-d0db26f74e22)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJUyroEr_sWrVMN_zd%2F-LaJfW0IeddZXWw06RzW%2Fimage.png?alt=media\&token=a2bf4b8c-476c-4603-820d-c9dbed497b78)

#### 先寫後寫沒有絕對關係

#### 1.索引的東西

#### relativelayout一定要給id

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJUyroEr_sWrVMN_zd%2F-LaJhWzUS3NlbrZnmqAo%2Fimage.png?alt=media\&token=fd50e8b7-8bfb-42f5-a2e6-e6ea41942afd)

#### 相對父子容器

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJUyroEr_sWrVMN_zd%2F-LaJiZvMoDzLfjG2XBqa%2Fimage.png?alt=media\&token=5f7b7393-e4ae-4e5a-bc0a-9b3ef69eab63)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJrgvqT6oQHVbzZuLx%2F-LaJsPXDc09bOp1DcL4P%2Fimage.png?alt=media\&token=734658b2-cbba-4a9f-b3ce-79445f6f1d76)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJrgvqT6oQHVbzZuLx%2F-LaJsVXvR0kXvCuJB3Qd%2Fimage.png?alt=media\&token=34b9d66f-bfd0-4ff6-9870-1247a1583435)

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJrgvqT6oQHVbzZuLx%2F-LaJs_Ieb_OhTRw_rD-Q%2Fimage.png?alt=media\&token=3001d80e-acfa-40af-adb9-e0280bace37e)

#### 相對於某個物件

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJxgUkp4TBEoMosovx%2F-LaK2A5KpbWNI9KVCpHa%2Fimage.png?alt=media\&token=3cddbffd-2ec5-4623-880b-88b4be243205)

gui

![](https://1902678905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LVJQfuBXyvHwCd1Nadk%2F-LaJxgUkp4TBEoMosovx%2F-LaK2_tHUPM_PdGyULkR%2Fimage.png?alt=media\&token=24e383c0-d0a2-457b-8f2b-053d01b71166)

必要之惡必須刪除
