I\'m quite a newbie for the eclipse, and I\'m just started to write some code(actually it\'s just copy and paste from the website) can anyone help me about this??? *the erro
XML document structure must start and end within the same entity, as you can see, there's a < ToggleButton .... > and a < /ToggleButton > which make a pair, but < LinearLayout .... > still needs something to make a pair.
I think it's better for you to have a better understanding of XML, it's quite easy and useful.here's a good tutorial:
https://developer.mozilla.org/en/docs/XML_Introduction
use this code :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical" >
<ToggleButton
android:id="@+id/toggleButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</ToggleButton>
</LinearLayout>
You need to close the LinearLayout tag.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical" >
<ToggleButton
android:id="@+id/toggleButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
</ToggleButton>
</LinearLayout>