title: Buttons are hiding but not showing when focus is moving in Android
body: <p>I have some odd requirement. I have some menu buttons.when i am clicking on the buttons some other 3 buttons should visible. But when the focus is moving to another menu button, this 3 buttons should hide or become invisible. i did the first requirement. But unable to do the second. I take the three buttons in a relative layout.</p>
  
  <pre><code>&lt;RelativeLayout android:id="@+id/relativelayout_inventory"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:layout_below="@id/relativelayout_menu"
           android:layout_toRightOf="@id/relativelayout_checkout"
           android:layout_marginTop="10px"
           android:layout_marginLeft="18px"
           android:visibility="invisible"
     &gt;
     &lt;Button android:id="@+id/stckupdt"
          android:background="@drawable/stckupdt"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
    &gt;
    &lt;/Button&gt;
  
    &lt;Button android:id="@+id/pushoffer"
          android:background="@drawable/stckstatus"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@id/stckupdt"
          android:layout_marginTop="10px"
    &gt;
    &lt;/Button&gt;
   &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And in the java file, i write the code like below..</p>
  
  <pre><code>final Button button_inventory = (Button)findViewById(R.id.inventory);
          final RelativeLayout view_inventory = (RelativeLayout)findViewById(R.id.relativelayout_inventory);
          button_inventory.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  // TODO Auto-generated method stub
                  view_inventory.setVisibility(View.VISIBLE);
              }
          });
  </code></pre>