09.11.2010 22:18, bobetko пишет:
Thank You Kostya,
I did as you said and it works. Here is what I have done:
Copacetic.
[ snip ]
So, this way I managed to do what I wanted. I just don't understand
why I had to reference LayoutParams of ScrollView instead of
RelativeView. Can somebody please explain. Thanks.
It's in the docs:
http://developer.android.com/reference/android/view/View.html#setLayoutParams(android.view.ViewGroup.LayoutParams)
public void setLayoutParams (ViewGroup.LayoutParams params)
Since: API Level 1
Set the layout parameters associated with this view. These supply
parameters to the parent of this view specifying how it should be
arranged. There are many subclasses of ViewGroup.LayoutParams, and
these correspond to the different subclasses of ViewGroup that are
responsible for arranging their children.
Parametersparams the layout parameters for this view
This makes sense, since layout_xxx values are used by a view's parent (a
ViewGroup) when positioning the view.
There are several different ViewGroup subclasses, each having different
capabilities to position its children, and therefore different ways to
specify positioning.
Hence, different sets of layout_xxx tags you can use in XML and
different subclasses of LayoutParams, conveniently nested in their
respective ViewGroup subclass (LinearLayout.LayoutParams,
RelativeLayout.LayoutParams, etc).
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en