So far, we've learnt how to build complex layouts using XML. If we want to make our user interface dynamic and respond to user input, we need to learn a programming language. For Android apps, that language is Java.

What's the difference between XML and Java?

XML is a markup language. It can be used to describe static information. For example, in Android we describe a layout using XML. It can describe fairly complex pieces of information as you've seen, as XML nodes can be placed inside of other nodes. However, what we cannot do with XML is describe behavior. XML can describe what a user interface is, but it cannot describe what a user interface should do.

Java is a programming language. It can be used to describe behavior. Using a programming language, you can write a sequence of instructions that your app will follow. You can receive user input, you can process information, and you can display responses to users. Java allows our app to come to life.

We will be learning the Java programming language bit by bit this week, and we will see how it can be used to build Android apps.

results matching ""

    No results matching ""