I created an activity which holds 3 custom components (defined in xml). 2 components extend View, 1 extends SurfaceView. They all lie in a LinearLayout, deviding screen real estate equally amongst the components. Click to see. I'm new so I can't post images directly...
Now I would like to maximize one View when it is clicked (using a sliding animation). The other two should slide out to the bottom. All should run at the same time and the animation needs to hold when the desired view is maximized.
I created two animation (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 this doesn't do what I want. I'm thinking my attempt might be a deadend. So can anyone please provide some help?