I tried requestLayout() but it still doesn't work.

Maybe I use the wrong order?

1. button.setAnimation(...);
2. button.requestLayout();
3. button.setLayoutParams(new AbsoluteLayout.LayoutParams(width, height, x,
y));

Do I have to call button.postInvalidate() also?

-----Ursprüngliche Nachricht-----
Von: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] Im Auftrag von Romain Guy
Gesendet: Dienstag, 17. Februar 2009 08:01
An: android-developers@googlegroups.com
Betreff: [android-developers] Re: button animation problem


You should also call requestLayout().

On Mon, Feb 16, 2009 at 10:56 PM, Christian Wiesbauer
<christian.wiesba...@bdc.at> wrote:
>
> I changed it this way:
>
> button.setLayoutParams(new AbsoluteLayout.LayoutParams(width, height, x,
> y));
>
> -----Ursprüngliche Nachricht-----
> Von: android-developers@googlegroups.com
> [mailto:android-develop...@googlegroups.com] Im Auftrag von Romain Guy
> Gesendet: Montag, 16. Februar 2009 20:42
> An: android-developers@googlegroups.com
> Betreff: [android-developers] Re: button animation problem
>
>
> How do you change the layout params?
>
> On Mon, Feb 16, 2009 at 7:37 AM, Christian Wiesbauer
> <christian.wiesba...@bdc.at> wrote:
>> Hi,
>>
>>
>>
>> I rotate a button 90 degrees anti-clockwise with a RotateAnimation. I
also
>> change the position of this button with AbsoluteLayout.LayoutParams. My
>> problem is that after these steps the button cannot be clicked or
focused.
>> If I click on the old position (before the animation) the onClick event
is
>> called. How can I set the "click area" to the new position? Does
>> TouchDelegate do the trick?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Christian Wiesbauer
>>
>>
>>
>> >
>>
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
>
>
>
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to