in android xml file, i often see two different format:
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/DrawableResources" />
OR
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/DrawableResources" ></TextView>
Are they the same? Are all the XML tag in android without contents between <TextView> and </TextView> can be written in the two format ?
Yes, it is a shortcut which I prefer using. However, some tags do use the long method such as LinearLayout and RelativeLayout and ScrollView to name a few as these examples accept content within themselves.
Have a read of the docs here: http://developer.android.com/guide/topics/ui/declaring-layout.html