Skip to content

Commit 232e72e

Browse files
Update HELLO_WORLD.md
1 parent 38a73a8 commit 232e72e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/HELLO_WORLD.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class Example extends Activity {
3434

3535
# Create a UI with XML.
3636

37-
For create complex UIs you can use XMLs, first you need create your layout file a like `res/layout/example.xml`, that is a example of a simple Hello world layout:
37+
For create complex UIs you can use XMLs, first you need create your layout file `res/layout/example.xml`, that is a example of a simple Hello world layout:
3838

3939
```xml
4040
<?xml version="1.0" encoding="UTF-8" ?>
@@ -64,4 +64,12 @@ public void onCreate() {
6464

6565
### Change widgets from a xml layout.
6666

67-
For access and edit nodes created from xml layout, you can use method: ``findViewById('NODE_ID')``, and set tag id in your node.
67+
For access and edit nodes created from xml layout, you can use method: ``findViewById('NODE_ID')``, and set tag id in your xml code, example:
68+
69+
```xml
70+
<TextView
71+
id="NODE_ID"
72+
width="match_parent"
73+
height="match_parent"
74+
text="Hello world"/>
75+
```

0 commit comments

Comments
 (0)