[android-developers] Re: How do I know that a View has been resized?

2010-08-04 Thread Sarwar Erfan
Hi, (Not global, just for your case following the code you written in your fist post) [code] button.setLayoutParams(new LinearLayout.LayoutParams(100,200)); Log.v(TAG, "Size = "+button.getLayoutParams().width + "," + button.getLayoutParams().height); [/code] getWidth and getHeight will not w

[android-developers] Re: How do I know that a View has been resized?

2010-08-04 Thread Jan Meskens
I am calling the setLayoutParams in a click event of another button. The button size is being changed visually, but also after a very short timespan. Jan On 4 aug, 13:57, Sarwar Erfan wrote: > Hi, > Is your button size being changed visually? (just to make sure) > > And, where are you calling th

[android-developers] Re: How do I know that a View has been resized?

2010-08-04 Thread Sarwar Erfan
Hi, Is your button size being changed visually? (just to make sure) And, where are you calling the setLayoutParams method? In some event? Regards Sarwar Erfan On Aug 4, 5:16 pm, Jan Meskens wrote: > Thanks for your reply. But the problem is that this solution can only > be applied to custom wi

[android-developers] Re: How do I know that a View has been resized?

2010-08-04 Thread Jan Meskens
Thanks for your reply. But the problem is that this solution can only be applied to custom widgets (which are subclassed fromt View) and thus can override the protected onSizeChanged. How can I do it for existing widgets without making a custom class? Jan On 4 aug, 12:23, Sarwar Erfan wrote: >

[android-developers] Re: How do I know that a View has been resized?

2010-08-04 Thread Sarwar Erfan
protected void onSizeChanged (int w, int h, int oldw, int oldh) On Aug 4, 2:30 pm, Jan Meskens wrote: > Hi all, > > I am currently looking for a way to detect that a view has been > resized. It seems that there is some time between calling a resize > method and when it is actually resized > > F