If you rotate with animation, you have to tell the layouts to
recalculate. So on the buttons you would use SetLayoutParam() I
believe, passing in a LinearLayoutParam which you create with the
parameters the buttons should be laid out to.

-niko

On Oct 5, 6:44 am, Chenna <[email protected]> wrote:
> any one help me this?
>
> On Oct 4, 5:22 pm, Chenna <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi
>
> > I am forced to fix my CameraPrview Activity in landscape. Now i am
> > adding buttons on top of surface with linear layout and rotating the
> > same with Animation. After rotating my buttons are not clickable.
> > before rotation buttons are clickable.
>
> > i have re/anim/rotation.xml
> > <rotate  xmlns:android="http://schemas.android.com/apk/res/
> > android"
> > android:fromDegrees="0"
> > android:toDegrees="-90"
> > android:pivotX="50%"
> > android:pivotY="50%"
>
> > android:duration="100"
> > android:startOffset="0"
> > android:fillAfter="true">
> >  </rotate>
>
> > Animation Code
>
> > RotateAnimation rotateAnim =
> > (RotateAnimation)AnimationUtils.loadAnimation(this, R.anim.rotation);
> >          LayoutAnimationController animController = new
> > LayoutAnimationController(rotateAnim, 0);
> >          //rotateAnim.setFillEnabled(true);
> >          //rotateAnim.setFillAfter(true);
> >         panel.setAnimation(rotateAnim);
>
> > Where panel is LinearLayout(vertical) and it has two
> > LinearLayout(horizontal) with couple of buttons
>
> > I have two issues.
> > 1. After rotation buttons are not clickable.
> > 2. I dont know what values to provide in rotate xml to bring all
> > layout to top of the portrait. Now i am getting at center.
>
> > thanks
> > Chenna

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

Reply via email to