Note that there are some explanatory texts on larger screens.

plurals
  1. POsetVisibility hides nearby objects aswell
    text
    copied!<p>Im hiding a button from within a handler (This is after i have made it Visible in another state of the app). The handler receives a message from a running thread and then updates the GUI.</p> <p>The problem is that nearby (not all) buttons and textviews are also dissappearing from the screen.. Im using Relative Layout.</p> <p>Layout:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/widget54" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;Button android:id="@+id/btnFold" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:text="Fold" android:visibility="invisible"/ &gt; &lt;Button android:id="@+id/btnRaise" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_toLeftOf="@+id/btnFold" android:text="Raise" android:visibility="invisible"/&gt; &lt;Button android:id="@+id/btnCall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_toLeftOf="@+id/btnRaise" android:text="Call" android:visibility="invisible" /&gt; &lt;TextView android:id="@+id/txtFlopTurnRiver" android:layout_width="135dp" android:layout_height="50dp" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:text=" " /&gt; &lt;TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/btnCall" android:layout_toLeftOf="@+id/btnCall" android:text="Chip amount:" /&gt; &lt;TextView android:id="@+id/txtHand1" android:layout_width="73dp" android:layout_height="wrap_content" android:layout_above="@+id/textView1" android:layout_centerHorizontal="true" android:text=" " /&gt; &lt;Button android:id="@+id/btnDeal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:text="@string/deal_deck" android:visibility="invisible" /&gt; &lt;Button android:id="@+id/btnRiver" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_toRightOf="@+id/btnDeal" android:text="River" android:visibility="invisible" /&gt; &lt;TextView android:id="@+id/txtHand2" android:layout_width="73dp" android:layout_height="wrap_content" android:layout_above="@+id/txtHand1" android:layout_toLeftOf="@+id/btnRaise" android:text=" " /&gt; &lt;TextView android:id="@+id/txtHand3" android:layout_width="73dp" android:layout_height="wrap_content" android:layout_alignRight="@+id/btnRaise" android:layout_centerVertical="true" android:text=" " /&gt; &lt;TextView android:id="@+id/txtHand8" android:layout_width="73dp" android:layout_height="wrap_content" android:layout_above="@+id/txtHand1" android:layout_alignLeft="@+id/btnRiver" android:text=" " /&gt; &lt;TextView android:id="@+id/txtHand6" android:layout_width="73dp" android:layout_height="21dp" android:layout_above="@+id/txtFlopTurnRiver" android:layout_alignLeft="@+id/txtHand8" android:layout_marginBottom="26dp" android:text=" " /&gt; &lt;TextView android:id="@+id/txtHand4" android:layout_width="73dp" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/txtHand6" android:layout_alignBottom="@+id/txtHand6" android:layout_toLeftOf="@+id/btnRaise" android:text=" " /&gt; &lt;TextView android:id="@+id/txtHand5" android:layout_width="73dp" android:layout_height="wrap_content" android:layout_above="@+id/txtHand4" android:layout_alignLeft="@+id/txtHand1" android:layout_marginBottom="14dp" android:text=" " /&gt; &lt;TextView android:id="@+id/txtHand7" android:layout_width="73dp" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/txtHand3" android:layout_alignBottom="@+id/txtHand3" android:layout_alignRight="@+id/btnRiver" android:layout_marginRight="26dp" android:text=" " /&gt; &lt;TextView android:id="@+id/txtChipAmount" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/textView1" android:layout_toLeftOf="@+id/btnCall" android:layout_toRightOf="@+id/txtHand1" android:text="103360" /&gt; </code></pre> <p></p> <p>Does anyone know what could be causing the problem?</p> <pre><code>btnFold = (Button)findViewById(R.id.btnFold); btnFold.setVisibility(View.GONE); </code></pre>
 

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