XML : Understanding

  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"       xmlns:tools="http://schemas.android.com/tools"       android:layout_width="match_parent"       android:layout_height="match_parent"       android:paddingLeft="@dimen/activity_horizontal_margin"       android:gravity="top|center" android:orientation="vertical"       android:paddingRight="@dimen/activity_horizontal_margin"       android:paddingTop="@dimen/activity_vertical_margin"       android:paddingBottom="@dimen/activity_vertical_margin"                 tools:context="com.example.stepp.layoutfun.DetailsActivity">    <TextView android:id="@+id/turtle_info" android:text=""       android:layout_width="wrap_content"       android:layout_height="wrap_content"/>  <TextView android:text="Describe this turtle:"       android:layout_width="wrap_content"       android:layout_height="wrap_content"/>  <LinearLayout android:layout_width="match_parent"       android:layout_height="wrap_content">  <EditText android:id="@+id/the_word"        android:layout_weight="1" android:layout_width="wrap_content"       android:layout_height="wrap_content"/>  <Button android:text="Submit"        android:onClick="onclickSubmit"        android:layout_width="wrap_content"       android:layout_height="wrap_content"/>  </LinearLayout>  <!--        <TextView      android:text="Type an English word:"      android:layout_marginTop="30dp"      android:layout_width="wrap_content"      android:layout_height="wrap_content" />    <LinearLayout      android:layout_width="match_parent"      android:layout_height="wrap_content">      <EditText          android:id="@+id/english_word"          android:hint="type a word here"          android:layout_weight="1"          android:layout_width="wrap_content"          android:layout_height="wrap_content" />      <Button          android:id="@+id/english_word_submit"          android:layout_width="wrap_content"          android:layout_height="wrap_content" />  </LinearLayout>    -->  </LinearLayout>        

I cannot see why has been used? What is the purpose of this? It seems like Android Studio seems to skip over it, so why has the author used it?

I looked online at https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references and googled it but found no responses.

For more information see this course, week 4, https://web.stanford.edu/class/cs193a/lectures.shtml.

No comments:

Post a Comment