1. 設置工作區 Set up your workspace
app → res → layout → activity_main.xml.
Click Device for Preview → Select your device
2. 加入文字及按鈕 Add a text box and a button
Click TextView in the Component Tree panel → Press the Delete key
Drag button
Click Open editor (opens the Translations Editor) → Click Add Key
- Add Key 1:
- Key: "edit_message"
- Default Value: "Enter a message"
- Add Key 2:
- Key: "button_send"
- Default Value: "Send"
- text box:
- text property: Delete the value
- hint property: Click Pick a Resource. Double-click edit_message
- button:
- text property: Delete the value
- hint property: Click Pick a Resource. Double-click button_send
4. Run the app on an emulator(AVD). Successfully!
留言