title: Toggle Button not displaying in app
body: <p>I've created an activity with a toggle button. I've also written the code to handle the clicks.</p>
  
  <p>But when I run the app, the toggle button doesn't show up on the activity screen.</p>
  
  <p>I thought it might be a problem with the emulator so I exported it and tried it on my phone.</p>
  
  <p>But it doesn't show up on the phone also.</p>
  
  <p>Here is the activity layout file description.</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;Button
          android:id="@+id/btnStartService"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"
          android:text="Start Notifying" /&gt;
  
      &lt;EditText
          android:id="@+id/txtUserMsg"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_above="@+id/btnStartService"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="82dp"
          android:ems="10"
          android:inputType="textMultiLine" &gt;
  
          &lt;requestFocus /&gt;
      &lt;/EditText&gt;
  
      &lt;TextView
          android:id="@+id/txtWelcomeMsg"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="18dp"
          android:text="TextView" /&gt;
  
      &lt;TextView
          android:id="@+id/textView1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_above="@+id/txtUserMsg"
          android:layout_centerHorizontal="true"
          android:text="Message to reply with" /&gt;
  
      &lt;Button
          android:id="@+id/stopNotifying"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/btnStartService"
          android:layout_centerHorizontal="true"
          android:layout_marginTop="40dp"
          android:text="Stop Notifying" /&gt;
  
      &lt;TextView
          android:id="@+id/textView2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_above="@+id/btnStartService"
          android:layout_alignLeft="@+id/txtUserMsg"
          android:layout_marginBottom="29dp"
          android:text="Caller Notifications" /&gt;
  
      &lt;ToggleButton
          android:id="@+id/tglStartStop"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignBaseline="@+id/textView2"
          android:layout_alignBottom="@+id/textView2"
          android:layout_toRightOf="@+id/txtWelcomeMsg"
          android:text="ToggleButton"
          android:visibility="visible" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Any idea why this might be??</p>