title: Application may be doing too much work in the main thread?
body: <p>I keep having an issue with my recipe book app where it says I am doing too much work in the main thread. I have attached my code. Can someone tell me why this is the issue?? I have never gotten it before and other posts don't help. If someone has an answer, can you please explain in detail?? I am new to this. I need you to explain it to me as if I was 5, as condescending as possible...</p>
  
  <pre><code>package com.example.recipebook;
  
  import com.example.recipebook.util.SystemUiHider;
  
  import android.view.View;
  import android.widget.Button;
  import android.app.Activity;
  import android.os.Bundle;
  import android.content.Intent;
  
  public class MainPage extends Activity{
      @Override
      public void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main_page);
          Button searchButton = (Button) findViewById(R.id.triggerSearch);
          Button submitButton = (Button) findViewById(R.id.triggerSubmit);
          searchButton.setOnClickListener(new View.OnClickListener() {
              public void onClick(View view) {
                  openSearchPage();
              }
          });
          submitButton.setOnClickListener(new View.OnClickListener() {
              public void onClick(View view) {
                  openSubmitPage();
              }
          });
      }
  
  public void openSearchPage(){
      Intent openSearchPage = new Intent(this,SearchPage.class);
      startActivity(openSearchPage);
  }
  
  public void openSubmitPage(){
      Intent openSubmitPage = new Intent(this,SumbitRecipePage.class);
      startActivity(openSubmitPage);
   }
  }
  
  package com.example.recipebook;
  
  import android.app.Activity;
  import android.os.Bundle;
  
  public class SumbitRecipePage extends Activity{
      @Override
      public void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
          setContentView(R.layout.submitrecipepage);
      }
  }
  
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:background="#ffd100"&gt;
  
  &lt;Button
      android:layout_weight="1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Search"
      android:id="@+id/triggerSearch"
      android:layout_alignParentTop="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:layout_alignRight="@+id/triggerSubmit"
      android:layout_alignEnd="@+id/triggerSubmit" /&gt;
  
  &lt;Button
      android:layout_weight="1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Submit"
      android:id="@+id/triggerSubmit"
      android:layout_below="@+id/triggerSearch"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:layout_alignRight="@+id/button3"
      android:layout_alignEnd="@+id/button3" /&gt;
  
  &lt;Button
      android:layout_weight="1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Categories"
      android:id="@+id/button3"
      android:layout_below="@+id/triggerSubmit"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:layout_alignRight="@+id/button4"
      android:layout_alignEnd="@+id/button4" /&gt;
  
  &lt;Button
      android:layout_weight="1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Favourites"
      android:id="@+id/button4"
      android:layout_below="@+id/button3"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:layout_alignRight="@+id/button5"
      android:layout_alignEnd="@+id/button5" /&gt;
  
  &lt;Button
      android:layout_weight="1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Shopping List"
      android:id="@+id/button5"
      android:layout_below="@+id/button4"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:layout_alignRight="@+id/button6"
      android:layout_alignEnd="@+id/button6" /&gt;
  
  &lt;Button
      android:layout_weight="1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Pantry"
      android:id="@+id/button6"
      android:layout_below="@+id/button5"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:layout_alignRight="@+id/button7"
      android:layout_alignEnd="@+id/button7" /&gt;
  
  &lt;Button
      android:layout_weight="10"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Random Recipe"
      android:id="@+id/button7"
      android:layout_below="@+id/button6"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true" /&gt;
  
  &lt;/RelativeLayout&gt;
  
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.recipebook" &gt;
  
    &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.example.recipebook.MainPage"
          android:configChanges="orientation|keyboardHidden|screenSize"
          android:label="@string/app_name"
          android:theme="@style/FullscreenTheme" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>This is the error output whenever I click on one of the buttons to bring me to the other pages. What is going on?? It just says "Unfortunately, RecipeBook has stopped." and quits.</p>
  
  <pre><code>03-09 14:37:00.329    1145-1145/com.example.recipebook I/Choreographer﹕ Skipped 38 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:02.909      372-387/system_process I/Choreographer﹕ Skipped 68 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:03.299      372-386/system_process I/Choreographer﹕ Skipped 31 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:03.509      372-386/system_process I/Choreographer﹕ Skipped 42 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:03.719      372-386/system_process I/Choreographer﹕ Skipped 31 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:03.789      372-387/system_process I/Choreographer﹕ Skipped 116 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:03.999      372-386/system_process I/Choreographer﹕ Skipped 30 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:04.209      372-386/system_process I/Choreographer﹕ Skipped 41 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:04.429      372-387/system_process I/Choreographer﹕ Skipped 42 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:04.909      372-387/system_process I/Choreographer﹕ Skipped 63 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:04.929      528-528/com.android.launcher I/Choreographer﹕ Skipped 297 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:06.199      372-386/system_process I/Choreographer﹕ Skipped 30 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:06.909      372-386/system_process I/Choreographer﹕ Skipped 33 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:07.299      372-386/system_process I/Choreographer﹕ Skipped 98 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:07.529      372-386/system_process I/Choreographer﹕ Skipped 37 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:07.849      372-386/system_process I/Choreographer﹕ Skipped 61 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:08.039      372-386/system_process I/Choreographer﹕ Skipped 47 frames!  The application may be doing too much work on its main thread.
  03-09 14:37:09.789      372-387/system_process I/Choreographer﹕ Skipped 77 frames!  The application may be doing too much work on its main thread.
  </code></pre>