How XML make an User Interface for android



After reading some resources I found that XML is used to store data and show data. But in android XML is used to make a layout. Here I am confused. How XML makes an user interface. In JAVA for a text field we use



JTextField jt = new JTextField(30);
add(jt);


But in android for a text field we write



<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10" />


I think when android machine find this XML code then it replace this XML by a JAVA code.


If I am wrong please correct me.


No comments:

Post a Comment