androideclipseadtgui-designerdesigntime-attributes

Why "Designtime Attributes" doesn't work?


Background

Google added nice "Designtime Attributes" (found about it from here) to be used only for UI-designer mode, so, for example, if you wish to show text on a textView (or EditText) just there (to help you understand how it looks like), you can just add:

    <EditText 
        tools:text="John Doe"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

example from Google:

enter image description here

In fact, this should work for any attribute you can already use. Not sure if there are any limitations, but it's very cool.

The problem

Now, when I do this in Eclipse (just a simple textView with the "tools:text" attribute), together with the latest ADT & SDK (22.3.0.v201310242005-887826) , it just doesn't work. It just doesn't do anything.

The question

Is it possible this feature works only for the new IDE (android studio) ? If so, how could it be? Shouldn't Google add each android-development feature to the ADT too?

Also, how come on some websites it's called "Designtime Layout Attributes" and on some it's just "Designtime Attributes" ?


Solution

  • OK, It seems this is planned for ADT (found from here) :

    Q:I see this is in Android Studio... Any plans for this to come to Eclipse/ADT?

    A:Yes, we'll port it to ADT. No ETA yet.