Note that there are some explanatory texts on larger screens.

plurals
  1. POOn the Android: How to define proper Animation to maximize one View while minimizing 2 others at the same time?
    text
    copied!<p>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. <a href="http://img502.imageshack.us/img502/7840/layoutww.png" rel="nofollow noreferrer">Click to see. I'm new so I can't post images directly...</a></p> <p>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.</p> <p>I created two animation (res/anim): shrink_view.xml and max_view.xml</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator"&gt; &lt;translate android:fromYDelta="0" android:toYDelta="100%p" android:duration="4000" /&gt; &lt;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" /&gt; &lt;/set&gt; &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator"&gt; &lt;translate android:fromYDelta="0" android:toYDelta="100%p" android:duration="4000" /&gt; &lt;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" /&gt; &lt;/set&gt; </code></pre> <p>But this doesn't do what I want. I'm thinking my attempt might be a deadend. So can anyone please provide some help?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload