Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8302447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:17:34+00:00 2026-06-08T17:17:34+00:00

Im hiding a button from within a handler (This is after i have made

  • 0

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.

The problem is that nearby (not all) buttons and textviews are also dissappearing from the screen.. Im using Relative Layout.

Layout:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget54"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

<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"/ >

<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"/>


<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" />

<TextView
    android:id="@+id/txtFlopTurnRiver"
    android:layout_width="135dp"
    android:layout_height="50dp"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:text=" " />


<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:" />

<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=" " />

<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" />

<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" />

<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=" " />

<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=" " />

<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=" " />

<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=" " />

<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=" " />

<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=" " />

<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=" " />



<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" />

Does anyone know what could be causing the problem?

btnFold = (Button)findViewById(R.id.btnFold);
btnFold.setVisibility(View.GONE);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:17:36+00:00Added an answer on June 8, 2026 at 5:17 pm

    Now that I see your full xml – when you set a View to GONE, views that are set relative to it (layout_toLeftOf, layout_above) are put in the top left (or wherever their other constraints put them, e.g. a view that is toLeftOf and aligned parent bottom will go to the bottom left of screen now (it has nothing to be toLeftOf and is on bottom). I’d recommend setting View.INVISIBLE if you just want to hide a View, not View.GONE unless you have a specific reason for that?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this structure (from markItUp plugin): It's image button with CSS a:hover element.
I have a winforms Application, On Close button click, I am hiding that application
I have an application from which a user can call another user with the
I have a way of hiding the back button used by the navigation controller.
Summery : I have a custom UITabBarAutoRotateController which returns YES from shouldAutorotateToInterfaceOrientation. This has
I made a gtk app with Ubuntu quickly tool.But I have encountered a few
I'm hiding the css class .pds-pd-link. This class styles the link www.polldaddy.com . The
I have been hiding a row in a WPF grid by setting the Height
I am having trouble with hiding/removing the card owner and image from the card
Today I have had a problem with hiding text with text-indent: -9999px rule. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.