How to set pivotX to right edge in xml

Viewed 299

How to set pivotX to right edge in xml. In res/anim it is possible by setting the value to "100%", but how it make in "res/animator" ?

res/animator/slide.xml

<set xmlns:android="http://schemas.android.com/apk/res/android">
        <objectAnimator
            android:propertyName="scaleX"
            android:valueFrom="0.f"
            android:valueTo="1.f"
            android:duration="@integer/durationAnimate"
            android:interpolator="@android:interpolator/accelerate_decelerate" />

        <objectAnimator
            android:duration="500"
            android:propertyName="pivotY"
            android:valueFrom="1.0"
            android:valueTo="1.0"
            android:valueType="floatType"/>
    </set>

I need it in animator because, I make picture browser when there is random animation. Animation implementation by:

getSupportFragmentManager()
            .beginTransaction()
            .setCustomAnimations(R.anim.slide_right_in, R.anim.slide_right_out)
            .replace(R.id.mainActivityNew_fragmentAnimate, FotoFragment.newInstance(itemsController.nextItem()))
            .commit();

In res/anim/... can not rotate fragment in axis (x or y), therefore, I would prefer to accomplish in res/animator/.... Unfortunately, I can in that make one type of animation and in that the second type of animation /

0 Answers
Related