iT邦幫忙

DAY 26
2

Android APP設計風格系列 第 26

裡面沒有程式碼 - Text Fields, Switches

Text Fields

一般文字輸入框

可以一直打過去或斷行

官方提供一些預設的登打模式

android:inputType="textEmailAddress"

"text" : 普通文字

"textEmailAddress" : email 鍵盤會提供 @

"textUri" :Uri 鍵盤會提供 /

"number" : 鍵盤會變成數字鍵盤

"phone" :鍵盤會變成打電話的樣子

實作API: https://developer.android.com/guide/topics/ui/controls/text.html

出來跑的,總是要還,繼續補Switch

Switches

用來表示true/false狀態

有下列幾個做法

Checkboxes

實作API: http://developer.android.com/guide/topics/ui/controls/checkbox.html

Radio Buttons

實作API: http://developer.android.com/guide/topics/ui/controls/radiobutton.html

On/off Switches

基本上是方的,要做成美美的圓的還要自己寫view

實作API: http://developer.android.com/reference/android/widget/Switch.html

同場加映:Toggle Button

實作API: http://developer.android.com/guide/topics/ui/controls/togglebutton.html

參考資料:

https://developer.android.com/guide/topics/ui/controls/text.html


上一篇
裡面沒有程式範例 - Buttons
下一篇
裡面沒有程式範例 - Seek Bars, Progress & Activity
系列文
Android APP設計風格30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言