Note that there are some explanatory texts on larger screens.

plurals
  1. POsetVisibility not working within ViewFlipper
    primarykey
    data
    text
    <p>I'm trying to disable a TextView within a ViewFlipper via setVisibility to GONE and cannot get it to act like I'm wanting. My code:</p> <pre><code>switch(index) { case 0: //Do Stuff findViewById(R.id.o2).setVisibility(8); findViewById(R.id.o3).setVisibility(8); break; case 1: //Do Stuff findViewById(R.id.o3).setVisibility(8); break; case 2: //Do Stuff break; } </code></pre> <p>my XML</p> <pre><code>&lt;ViewFlipper android:id="@+id/oFlipper" android:layout_width="wrap_content" android:layout_height="wrap_content" android:flipInterval="1000" android:inAnimation="@anim/push_up_in" android:outAnimation="@anim/push_up_out"&gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:textSize="26sp" android:text="Opponents:"/&gt; &lt;TextView android:id="@+id/o1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:textSize="26sp" android:visibility="gone"/&gt; &lt;TextView android:id="@+id/o2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:textSize="26sp" android:text="2"/&gt; &lt;TextView android:id="@+id/o3" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:textSize="26sp" android:text="3"/&gt; &lt;/ViewFlipper&gt; </code></pre> <p>I've tried the code before and after .startFlipping() to no avail. It appears that the TextView is gone for one view flip and then reappears. But even when hardcoded to GONE in the XML file the view is simply blank rather than shifting the other views up in its place. I basically just want the TextView to go away completely. Is there any way to accomplish this?</p>
    singulars
    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.
 

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