Note that there are some explanatory texts on larger screens.

plurals
  1. POViewFlipper in Fragment (TabHost) child not shown until touch on it
    primarykey
    data
    text
    <p>I have a Tab (suing Fragments) and the Tab content is actually a View Flipper.</p> <p>The first page of the Flipper shows list of images. When I click to some of the items I go to Flipper's page 2. Which will show the image in Full Screen. When I click Back it goes to the List View (with all images). Everything works as expected until I put in and out animations to the ViewFlipper. After I set in Animation to be some Translate animation, I see nothing, until I touch the screen. When I touch the screen I see the image, and if not, I see empty tab content. </p> <p>I am using ViewFlipper and Fragments from the support package.</p> <p>Is this some sort of expected behavior or an issue?</p> <p><strong>ADDED ANIMATIONS</strong></p> <p>left_to_right_in.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;set xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;translate android:duration="700" android:fromXDelta="-220%" android:fromYDelta="0" android:interpolator="@android:anim/accelerate_interpolator" android:toXDelta="0" android:toYDelta="0" /&gt; &lt;/set&gt; </code></pre> <p>left_to_right_out.xml:</p> <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;translate android:duration="700" android:fromXDelta="0" android:fromYDelta="0" android:interpolator="@android:anim/accelerate_interpolator" android:toXDelta="220%" android:toYDelta="0" /&gt; &lt;/set&gt; </code></pre> <p>right_to_left_in.xml:</p> <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;translate android:duration="700" android:fromXDelta="220%" android:fromYDelta="0" android:interpolator="@android:anim/accelerate_interpolator" android:toXDelta="0" android:toYDelta="0" /&gt; &lt;/set&gt; </code></pre> <p>right_to_left_out.xml:</p> <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;translate android:duration="700" android:fromXDelta="0" android:fromYDelta="0" android:interpolator="@android:anim/accelerate_interpolator" android:toXDelta="-220%" android:toYDelta="0" /&gt; &lt;/set&gt; </code></pre> <p>And then I use them like this:</p> <p>When I want to show the second child of the view flipper: </p> <pre><code>mViewFlipper.setInAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.left_to_right_in)); mViewFlipper.setOutAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.left_to_right_out)); mViewFlipper.showPrevious(); </code></pre> <p>When I want to go back to the first child:</p> <pre><code>mViewFlipper.setInAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.right_to_left_in)); mViewFlipper.setOutAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.right_to_left_out)); mViewFlipper.showNext(); </code></pre>
    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.
    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