title: Android hide and show components
body: <p>I am making a sqlite android application which is to list some data , show graphs , visit a web site by starting default browser(not in application by using webview) , send emails by using a form . I will have a couple of forms . So what I was thinking is that instead of using several activities and xml layouts I put it all in one xml layout and simply on button click show and hide components as it is done with javascript 
  These are my components for now ...</p>
  
  <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="fill_parent"
       android:layout_height="fill_parent"&gt;
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="432dp"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context=".MainActivity" &gt;
  
      &lt;TextView
          android:id="@+id/textView1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="32dp"
          android:text="ENTER COMPANY NAME " /&gt;
  
      &lt;EditText
          android:id="@+id/editText1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/textView1"
          android:layout_centerHorizontal="true"
          android:ems="10"&gt;
  
          &lt;requestFocus /&gt;
      &lt;/EditText&gt;
  
      &lt;Spinner
          android:id="@+id/spinner1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/editText1"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="17dp" 
          android:entries="@array/country_arrays"
          android:prompt="@string/country_prompt"
          /&gt;
  
      &lt;Spinner
          android:id="@+id/spinner2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/spinner1"
          android:layout_below="@+id/spinner1" 
          android:entries="@array/limit_arrays"
          android:prompt="@string/limit_prompt"
          /&gt;
  
      &lt;Button
          android:id="@+id/button1"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/spinner2"
          android:layout_centerHorizontal="true"
          android:text="Hide" /&gt;
  
      &lt;Button
          android:id="@+id/button2"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/button1"
          android:layout_centerHorizontal="true"
          android:text="Show" /&gt;
  
  &lt;/RelativeLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>Then I am to show or hide components by using for example </p>
  
  <pre><code>spinner1.setVisibility(View.VISIBLE); 
  spinner1.setVisibility(View.GONE); 
  </code></pre>
  
  <p>This seams to be working fine , but I am getting a kind of low on space on my xml screen. How do I put more components in the bottom and make my View scroll down although I have put </p>
  
  <pre><code>&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="fill_parent"
       android:layout_height="fill_parent"&gt;
  </code></pre>
  
  <p>on the top of my xml layout . And is this a good idea for a menu organisation ?</p>