Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid - Layout Animation Doesn't stay on top
    primarykey
    data
    text
    <p>I need to make 2 screens with custom animation like explained below :</p> <p></p> <pre> Screen 1 Screen 2 ----------------------------- ------------------------------ | | | | | | | | | | | | | | | | | | | List 1 | List2 | ---------> | List 3 | List 4 | | (75% width) |(25% wid)| |(25%wid)| (75% width) | | | | | | | | | | | | | ----------------------------- ------------------------------ </pre> <p></p> <ul> <li>User makes a long touch on an item in List 1 and slides from left to right. </li> <li>The view containing List 1 moves from left to right (till the end of the screen) and fades. Screen 2 is shown.</li> </ul> <p>I have put each of the lists in a <code>LinearLayout</code>and all the <code>LinearLayout</code>s is contained in a root <code>LinearLayout</code>. After detecting the left to right swipe on <code>List1</code>, I do this </p> <p><code></p> <pre> AnimationSet set = new AnimationSet(true); Animation animation = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.75f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f ); animation.setDuration(500); animation.setZAdjustment(Animation.ZORDER_TOP); // Keep the viewgroup on which this animation applies at the top. set.addAnimation(animation); LayoutAnimationController controller = new LayoutAnimationController(set, 0.0f); screenOne_layoutOne.setLayoutAnimation(controller); screenOne_layoutOne.startLayoutAnimation(); </pre> <p></code></p> <p>I was able to get the animation but the <code>screenOne_layoutOne</code>(layout containing the <code>List 1</code>) doesn't stay on top. The animation goes below <code>List2</code>.</p> <p>Can anyone tell me where the problem is?</p> <p>Thanks in advance. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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