What I meant was:
ScrollView.LayoutParams params = new ScrollView.LayoutParams();
params.gravity = ....
params.setMargins(.....)
relativeLayout.setLayoutParams(params);
Not sure if this is really going to work, since scrollview is designed
for, well, scrolling, so the way it draws its child is somewhat special.
But this *is* how you set layout_xxx values from code.
-- Kostya
09.11.2010 21:38, bobetko пишет:
I tried another approach. I defined my RelativeLayout in XML exactly
the way I liked it. Then I used inflater and dynamically added my
RelativeLayout to ScrollView
It didn't work. It simply ignored all my XML settings. For example,
it fully filled the parent (ScrollView) even though I explicitly
specified to WRAP_CONTENT in my XML file. All this seems to me very
very wrong...
--
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