The first part
In Android development, when writing layout code, the IDE can see the layout Preview. However, some effects must be run before they can be seen, like this: TextView does not set any characters in the XML, but instead sets the text in the activity. So in order to preview the effect in the IDE, you have to set the Android:text property for the TextView control in the XML, generally we tell ourselves when we do this, it's okay, and I'll delete all of this when I finish writing the code. But you may forget that there is such a code in your final product.
the above situation can be avoided and we use Tools namespace and its properties to solve this problem. xmlns:tools= "http://schemas.android.com/tools", tools can tell Android Studio which properties are ignored at run time, Only works when layout is designed.
Types of tools Properties
The tools attribute can be divided into two types: one that affects Lint hints, and one that is about XML layout design. The above introduction is the most basic use of tools: in the UI design to cover the standard Android properties, belong to the second type. The lint related properties are described below.
Lint properties related to
Tools:ignore
Tools:targetapi
Tools:locale
Part II
In this section we will continue to introduce other properties about UI previews (not standard Android properties).
Tools:context
Tools:menu
Tools:actionbarnavmode
Tools:listitem/listheader/listfooter
Tools:showin
Tools:layout
Original Address : http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0309/2567.html
An explanation of XML tools properties in Android