Skip to content

Commit

Permalink
Update HELLO_WORLD.md
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBRDeveloper committed Apr 11, 2024
1 parent 38a73a8 commit 232e72e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/HELLO_WORLD.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Example extends Activity {

# Create a UI with XML.

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:
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:

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

### Change widgets from a xml layout.

For access and edit nodes created from xml layout, you can use method: ``findViewById('NODE_ID')``, and set tag id in your node.
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:

```xml
<TextView
id="NODE_ID"
width="match_parent"
height="match_parent"
text="Hello world"/>
```

0 comments on commit 232e72e

Please sign in to comment.