tools:context="com.example.guolin.scrollertest.MainActivity"有时候可以看到有这个东西,但是从来没有用过,不知道有什么作用。猜测:这样的意思是把MainActivity加载进来吗??还是怎么的??有没有用到tools的DEMO啊?
tools
The related properties are hints to the editor, which is used to assist the editor to show the effect, and these properties are not useful on the real machine. For example, tools:context
this is to layout
associate this file with the following Activity
, so that when the editor shows the layout effect, it can target Activity
some of the properties for targeted processing.
/************************************************************/
tools:context= the phrase "activity name" will not be packaged into the APK.
Just the layout editor of ADT sets the corresponding render context in your current layout file,
Indicates that the rendering context where your current layout is located is the activity of activity name,
If the activity has a theme set in the manifest file,
Then the ADT Layout Editor will render your current layout according to this theme.
That is, if you set the mainactivity set a theme.light (others can),
Then you see in the visual layout manager of the background of a control ah or something should be theme.light look.
Just to show you what you see and what you get.
from:http://blog.csdn.net/cdl343794966/article/details/13168059
from:https://segmentfault.com/q/1010000004444220?_ea=611520
"Turn" Android tools:context