I created an action that contains 3 custom components (defined in xml). 2 components expand the view, 1 extends the SurfaceView. All of them are in LinearLayout, which allows you to split the screen real estate equally between the components. Click to view. I am new, so I can not send images directly ...
Now, I would like to maximize one view when it is clicked (using sliding animation). The remaining two should push to the bottom. Everything should start at the same time, and the animation should be kept at the maximum magnification of the desired view.
I created two animations (res / anim): shrink_view.xml and max_view.xml
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator"> <translate android:fromYDelta="0" android:toYDelta="100%p" android:duration="4000" /> <scale android:fromXScale="1" android:toXScale="1" android:fromYScale="1" android:toYScale="0.0" android:pivotX="0%" android:pivotY="50%" android:fillAfter="false" android:startOffset="0" android:duration="4000" android:fillBefore="true" /> </set> <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator"> <translate android:fromYDelta="0" android:toYDelta="100%p" android:duration="4000" /> <scale android:fromXScale="1" android:toXScale="1" android:fromYScale="1" android:toYScale="100" android:pivotX="100%" android:pivotY="100%" android:startOffset="0" android:duration="4000" android:fillBefore="true" /> </set>
But that does not do what I want. I think my attempt may be dead. So can anyone help?
source share