nou wrote: > It doesn't work. That's to change the margin at instantiation time. I > already have an element on the page which I retrieve like this > > LinearLayout el = (LinearLayout) findViewById(R.id.xxx); > > I'd like to change the margin of the element which is ALREADY > rendered
That's what TreKing was pointing you toward. Step #1: Get your widget's LayoutParams Step #2: Change the margin values Step #3: Either call setLayoutParams() (on the widget) or invalidate() (on the parent) to visibly affect the change -- I'm a bit fuzzy on this step, as it's been ages since I've needed to make changes like this -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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

