ADT now generates XML layouts with the following attributes:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${packageName}.${activityClass}" >
How do the design tools know which class it belongs to?
My Eclipse ADT autogenerates the following:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${relativePackage}.${activityClass}" >
</RelativeLayout>
My question is: "Is there an Eclipse ADT reference that lists and explains all of the available variables one can use with the Android Tools Attributes?"
For example, it would be nice to see something like:
package=
attribute of the <manifest>
element in the file "AndroidManifest.xml".android:name=
attribute of the <activity>
element in the file "AndroidManifest.xml".I found some links related to the tools namespace, but none of them explain how Eclipse ADT resolves, for example, ${relativePackage}
.
Android Tools Project Site
Tools Attributes -> shows the attributes available in the "tools" namespace
Designtime Layout Attributes -> shows some of the "how and why" you would use the attributes
StackOverflow Site
Android “tools” namespace in layout xml documentation -> shows abstraction of the attributes values into xml files
What's “tools:context” in Android layout files? -> shows a lot of good info on Tools Attributes, but gives no answer to my question "Is there an Eclipse ADT reference that lists ..."; it only shows tools:context=".MainActivity"
What's tools:layout in fragment xml file? -> gives a bit of insight into using Eclipse ADT Graphical Layout editor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With