title: How to use a resource value to control a view's visibility?
body: <p>I have a Button widget that appears in multiple layouts. Eventually in the final release, the button will be hidden from the user, but until then I need it to be visible for the alpha and beta phases of development.</p>
  
  <p>Is there a way to control the visibility for that button from an unique resource value?</p>
  
  <p>Something like this:</p>
  
  <pre><code>&lt;!-- Feedback button --&gt;
  &lt;Button
      android:id="@+id/feedback"
      style="@android:style/Widget.Button.Small"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_marginBottom="@dimen/buttons_margin"
      android:layout_marginLeft="@dimen/buttons_margin"
      android:text="Feedback"
      android:visibility="&lt;some resource value&gt;"
      /&gt;
  </code></pre>
  
  <p>An alternative would be to have a boolean value, and set the Button's visibility programmatically, but it would have to be done in every single activity that this button in its layout.</p>