title: Android addListenerOnButton issue
body: <p>I'm trying to create an application with 5 buttons on the main page. For some reason the ListenerOnButton is not working and the app will close before showing xml buttons layout.</p>
  
  <p>Here's my MainActivity:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>public class MainListActivity extends Activity {
  
    ImageButton news;
    ImageButton weather;
    ImageButton counter;
    ImageButton fakoi;
    ImageButton gyalia;
    ImageButton uvindex;
  
   @Override
   public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_layout);
  
    addListenerOnButton();
  
   }
  
     public void addListenerOnButton() {
           news = (ImageButton) findViewById(R.id.news);
           weather = (ImageButton) findViewById(R.id.weather);
           fakoi = (ImageButton) findViewById(R.id.fakoi);
           gyalia = (ImageButton) findViewById(R.id.gyalia);
           uvindex = (ImageButton) findViewById(R.id.uvindex);
           
           news.setOnClickListener(new OnClickListener() {
  
               @Override
               public void onClick(View arg0) {
  
                   Intent intent = new Intent
                           (getApplicationContext(), MyOrasisNews.class);
                       startActivity(intent); 
               }
           });
           weather.setOnClickListener(new OnClickListener() {
  
               @Override
               public void onClick(View arg0) {
  
                   Intent intent = new Intent
                           (getApplicationContext(), MainActivity.class);
                       startActivity(intent); 
               }
           });
           gyalia.setOnClickListener(new OnClickListener() {
  
               @Override
               public void onClick(View arg0) {
  
                   Intent intent = new Intent
                           (getApplicationContext(), GyaliaActivity.class);
                       startActivity(intent); 
               }
           });
          fakoi.setOnClickListener(new OnClickListener() {
  
               @Override
               public void onClick(View arg0) {
  
                   Intent intent = new Intent
                           (getApplicationContext(), FakoiActivity.class);
                       startActivity(intent); 
               }
           });
          uvindex.setOnClickListener(new OnClickListener() {
  
               @Override
               public void onClick(View arg0) {
  
                   Intent intent = new Intent
                           (getApplicationContext(), UvMainActivity.class);
                       startActivity(intent); 
               }
           });
       }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>And this is the xml file</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
     &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/db1_root"
       android:background="@drawable/bg"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
     
    &lt;TableLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
   
          &lt;TableRow
              android:layout_width="fill_parent"
              android:layout_height="0dp"
              android:weightSum="1"
              android:layout_weight="0.5"&gt;
              &lt;RelativeLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.5"&gt;
  
                  &lt;Button
                      android:id="@+id/news"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:background="@drawable/homebg"
                      android:gravity="center|bottom"
                      android:paddingBottom="10dp"
                      android:singleLine="false"
                      android:text="News"
                      android:textSize="18sp" /&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:src="@drawable/news"
                      android:layout_centerInParent="true"/&gt;
              &lt;/RelativeLayout&gt;
              &lt;RelativeLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.5"&gt;
  
                  &lt;Button
                      android:id="@+id/weather"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:background="@drawable/homebg"
                      android:gravity="center|bottom"
                      android:paddingBottom="10dp"
                      android:singleLine="false"
                      android:text="Weather"
                      android:textSize="18sp" /&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:src="@drawable/weather"
                      android:layout_centerInParent="true"/&gt;
              &lt;/RelativeLayout&gt;
          &lt;/TableRow&gt;
   
          &lt;TableRow
              android:layout_width="fill_parent"
              android:layout_height="0dp"
              android:weightSum="1"
              android:layout_weight="0.5"&gt;
              &lt;RelativeLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.5"&gt;
  
                  &lt;Button
                      android:id="@+id/uvindex"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:background="@drawable/homebg"
                      android:gravity="center|bottom"
                      android:paddingBottom="10dp"
                      android:text="Uv Index"
                      android:textSize="18sp" /&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:src="@drawable/uvindex"
                      android:layout_centerInParent="true"/&gt;
              &lt;/RelativeLayout&gt;
              &lt;RelativeLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.5"&gt;
  
                  &lt;Button
                      android:id="@+id/fakoi"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:background="@drawable/homebg"
                      android:gravity="center|bottom"
                      android:paddingBottom="10dp"
                      android:text="S Fakwn"
                      android:textSize="18sp" /&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:src="@drawable/sfakon"
                      android:layout_centerInParent="true"/&gt;
              &lt;/RelativeLayout&gt;
          &lt;/TableRow&gt;
   
          &lt;TableRow
              android:layout_width="fill_parent"
              android:layout_height="0dp"
              android:weightSum="1"
              android:layout_weight="0.5"&gt;
              &lt;RelativeLayout
                  android:layout_width="0dp"
                  android:layout_height="match_parent"
                  android:layout_weight="0.5"&gt;
  
                  &lt;Button
                      android:id="@+id/gyalia"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:background="@drawable/homebg"
                      android:gravity="center|bottom"
                      android:paddingBottom="10dp"
                      android:text="S gyalion"
                      android:textSize="18sp" /&gt;
  
                  &lt;ImageView
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:src="@drawable/sgyalion"
                      android:layout_centerInParent="true"/&gt;
              &lt;/RelativeLayout&gt;
            
          &lt;/TableRow&gt;
   
      &lt;/TableLayout&gt;
       &lt;/LinearLayout&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any help will be appreciated.</p>