title: Start Activity with Button Android
body: <p>Ive got a problem. I want to open an Activity with a Button but it crashes all the time. 
  So I created 2 Classes and A Button. But it keeps crashing. </p>
  
  <ol>
  <li>Class is activity_home class() and second is   schedule_act() class.</li>
  </ol>
  
  <p><strong>activity_home class:</strong>  </p>
  
  <pre><code>    package my.action.bat;
  
      import android.app.Activity;
      import android.content.Intent;
      import android.os.Bundle;
      import android.view.View;
      import android.widget.Button;
  
      public class activity_home extends Activity {
  
          private Button ScheduleBtn;
  
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              // TODO Auto-generated method stub
              super.onCreate(savedInstanceState);
              setContentView(R.layout.main);
  
               ScheduleBtn = (Button) findViewById(R.id.home_btn_schedule);
  
              ScheduleBtn.setOnClickListener(new View.OnClickListener() {
  
                  public void onClick(View v) {
                      // TODO Auto-generated method stub
  
  
                      Intent myIntent = new Intent("my.action.bat.schedule_act");
                      startActivity(myIntent);
  
  
                  }
              });
          }
  
  
  
  
  
      }  
  </code></pre>
  
  <p><strong>schedule_act class:</strong>  </p>
  
  <pre><code>package my.action.bat;
  
      import android.app.Activity;
      import android.os.Bundle;
  
      public class schedule_act extends Activity {
  
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              // TODO Auto-generated method stub
              super.onCreate(savedInstanceState);
  
              setContentView(R.layout.schedule_layout);
          }
  
  
  
      }
  </code></pre>
  
  <p><strong>Android Manifest:</strong>  </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="my.action.bat"
          android:versionCode="1"
          android:versionName="1.0" &gt;
  
          &lt;uses-sdk android:minSdkVersion="8" /&gt;
  
          &lt;application
              android:icon="@drawable/ic_launcher"
              android:label="@string/app_name" &gt;
              &lt;activity
                  android:label="@string/app_name"
                  android:name=".activity_home" &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;activity
                  android:label="@string/app_name"
                  android:name=".schedule_act" &gt;
                  &lt;intent-filter &gt;
                      &lt;action android:name="my.action.bat.SCHEDULE_ACT" /&gt;
  
                      &lt;category android:name="android.intent.category.DEFAULT" /&gt;
                  &lt;/intent-filter&gt;
              &lt;/activity&gt;
          &lt;/application&gt;
  
      &lt;/manifest&gt;  
  </code></pre>
  
  <p>Thank you very much.</p>