Search code examples
androidandroid-viewandroid-relativelayout

Whats up with setScaleX/setScaleY?


While trying to find a solution for the layout that I want, I came across the setScaleX/setScaleY methods, which are members of the View class.

View class doc

Now looking at the methods of RelativeLayout and filtering by the API Level 8, since I'm developing an App for >= 2.2, the said methods fade out. But when looking at "Inherited XML Attributes From Class android.view.View" the properties android:scaleX/android:scaleY are still available. Unfortunately trying to use these properties doesn't work and Eclipse says: "error: No resource identifier found for attribute 'scaleX' in package 'android'"

RelativeLayout class doc

So it seems like the documentation is contradictory and scaleX/scaleY are not available until 3.0 or am I missing something?


Solution

  • Ok, it looks like this is a false representation in the docs, as it's explained here scaleX/scaleY are properties added to the View class with Honeycomb and therefore unfortunately not available in Froyo.