skink wrote:
>> Of course, it now dawns on me that the padding probably gets rotated
>> too, so I'm leaning more toward using shims or something to set my position.
>
> well, padding is imho shim here, so if you don't use
> android:background in your ImageView, padding is 'transparent' and it
> j
> Of course, it now dawns on me that the padding probably gets rotated
> too, so I'm leaning more toward using shims or something to set my position.
well, padding is imho shim here, so if you don't use
android:background in your ImageView, padding is 'transparent' and it
just works fine - you w
Romain Guy wrote:
> There is absolutely no need to do all these fancy computations
> yourself. Instead you can use the following constructor (or better
> yet, define the animation in XML):
>
> RotateAnimation(float fromDegrees, float toDegrees, int pivotXType,
> float pivotXValue, int pivotYType,
skink wrote:
> ok, i found it.
>
> animation stuff works OK: it rotates tho whole view (not image
> bounds), run hierarchyviewer and
> you'll see that pivot is ok.
>
> if you try to rotate image itself, try this
>
> ImageView iv = (ImageView) findViewById(R.id.iv);
> Matrix matrix = iv.getImage
Hi,
There is absolutely no need to do all these fancy computations
yourself. Instead you can use the following constructor (or better
yet, define the animation in XML):
RotateAnimation(float fromDegrees, float toDegrees, int pivotXType,
float pivotXValue, int pivotYType, float pivotYValue)
Here
Mark Murphy wrote:
> Rotate with unknown pivot. If you're seeing a rotation around the center
> point of the View with the parameters I gave you, then obviously there's
> something a wee bit off with my View.
>
> Hmmm...I have paddingRight and paddingTop values in the layout for this
> ImageView
skink wrote:
> i tested RotateAnimation with params you provided and it works
> perfectly (i rotated LinearLayout). What is bad behaviour at your
> side? does it rotate at all? or rotates but with unknown pivot?
Rotate with unknown pivot. If you're seeing a rotation around the center
point of the
also what is your after calling ctor looks like?
somethig like this?
View v = obtain_view_of_interest();
Animation animation =
animation.setDuration(1000);
v.startAnimation(animation);
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Mark Murphy napisaĆ(a):
> I have a 21x21 pixel image that I would like to animate about the center
> of the image.
>
> I would think that this would be correct:
>
> new RotateAnimation(0f, 360f,
> Animation.RELATIVE_TO_SELF, 0.5f,
> Animation.RELATIVE_
9 matches
Mail list logo