The problem is that in onCreate where all views are set all views sizes are 0. I have to dynamically create image depending on sizes of some views that are also dynamic depending on their content set at runtime. I didn''t dind any overridable in activity that is called AFTER all views are set and inflated and their runtime sizes and positions are valid.
On Jan 27, 10:48 am, "Mark Murphy" <mmur...@commonsware.com> wrote: > > How do I reposition views at runtime? > > The same way you position them in the first place -- by manipulating their > layout rules (e.g., android:layout_centerInParent). You do this via > calling getLayoutParams() on your View, casting it to an appropriate type > (e.g., RelativeLayout.LayoutParams), making the desired changes, and > calling setLayoutParams() to affect those changes. > > Note that I haven't done this in quite some time, so the above recipe is > from memory and may be a bit off, though I'm pretty sure it is mostly > correct. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en