Tuesday, February 25, 2014
Android newbie ask: tools: context and xmlns: tools dispensable? What is the significance? Thank you!
We created Hello, World where the TextView has a property: tools: context = "MainActivity_Strange.". Which, MainActivity_Strange is the name of the main activity.
My question is this tools: context attribute what is the point? Oh, seems to have no effect removed.
In addition, the new layout file, whether it is RelativeLayout, or LinearLayout. Has one attribute: xmlns:. Tools = "http://schemas.android.com/tools" What is the significance of this property? Remove seems to have no impact.
Thank you for pointing!<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
The same question, Bangding!
Reply:
Reply:
There are said, but E language is not good, do not really understand
seehttp://stackoverflow.com/questions/15368386/what-is-the-meaning-of-xmlnstools-in-android-xml-layout
Reply:
tools: context = "activity name" This one will not be packaged into the APK. Just Layout Editor ADT setup rendering context corresponding file in your current Layout which shows your current rendering context Layout where is the corresponding activity name that activity, if the activity is set Theme in the manifest file, the ADT's Layout according to the Theme Editor to render your current Layout. That is, if you set MainActivity set up a Theme.Light (the other can be), then you can see the visual layout manager which controls background Ah Ah what should be Theme.Light look. WYSIWYG is used only for you to see the effect of it.
http://www.mythroad.net/2013/01/08/toolscontext-mainactivity% E4% B8% 8Exmlnstools% E5% 90% 8D% E5% AD% 97% E7% A9% BA% E9% 97% B4 /
Reply:
http://stackoverflow.com/questions/11078487/whats-toolscontext-in-android-layout-files, this is pretty good, E asked not understand, translate it with a web
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment