Skip to content Skip to sidebar Skip to footer

When Are Closing Tags Required With Android View Markup?

For some Android XML attributes, you don't conclude the opening tag with a '>' until after you've inserted your formatting components. For example:

The benifit is that you don't need to write the closing tag which makes it simpler to read and if you have a huge xml file there are less data to transport. (This does not count for Android is this case, because the android SDK procudes internally a binary file.)

Solution 2:

If no other element like this for example <something></something> is inside another element then the end tag /> can be used. So in your example the EditText can end also with the /> tag.

When you want to add another element to your EditText then you need to close the XML of EditText with .

Solution 3:

for '>' write in XML

please write as mention below

android:text="Subtract &gt; 1"

Post a Comment for "When Are Closing Tags Required With Android View Markup?"