Q:

Why did my 2 buttons stop working?

Why did my 2 image buttons stop working after I added code for the email intent. I have been fiddling with the Public Void onCreate bundle and when I move that section of code below, it works again. Have I nested them incorrectly? Could someone please correct it?
My OnClickListener is basically not working as the button does nothing when clicked.
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.ImageButton;

public class contactActivity extends Activity implements OnClickListener {

    private WebView webView;
    private WebView webView1;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.contact);
        Button mail = (Button)findViewById(R.id.Sendbutton);
        mail.setOnClickListener(this);
    }

    public void onClick(View v) {
        switch(v.getId())
        {
            case R.id.Sendbutton:
                Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
                String[] recipients = new String[]{"email add", "",};
                emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, recipients);
                emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Sample mail");
                emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "This is a sample mail..");
                emailIntent.setType("text/plain");
                startActivity(Intent.createChooser(emailIntent, "Send mail client :"));
                finish();
                break;
        }

        ImageButton ViewFacebookFeed = (ImageButton) findViewById(R.id.ViewFacebookFeed);
        ImageButton ViewTwitterFeed = (ImageButton) findViewById (R.id.ViewTwitterFeed);

        //Add a listener to ImageButton1
        ViewFacebookFeed.setOnClickListener(new OnClickListener() {                       
            @Override
            public void onClick(View v) {
                openBrowser1();
            }           
        });                             
        ViewTwitterFeed.setOnClickListener(new OnClickListener() {                       
            @Override
            public void onClick(View v) {
                openBrowser2();
            }           
        });
    }
    private void openBrowser1() 
    {       
        //this intent is used to open other activity which contains another webView
        Intent intent = new Intent(contactActivity.this,fbtwitterfeedActivity.class);
        startActivity(intent);
    }
    private void openBrowser2() {
        // TODO Auto-generated method stub
        Intent intent1 = new Intent(contactActivity.this,twitterfeedActivity.class);
        startActivity(intent1); 
    }
}   

A:

The way you had it implemented, you only registered your button clicks after you clicked the "send" button. You call finish() in the send onClick so the listeners would never get registered. Register your listeners in onCreate and then listen for the clicks on the specific view ID in your onClick method. I've fixed your code so that you register the click listeners at the proper time and your onClick method handles all clicks from all buttons
public class contactActivity extends Activity implements OnClickListener {

    private WebView webView;
    private WebView webView1;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.contact);
        Button mail = (Button)findViewById(R.id.Sendbutton);
        mail.setOnClickListener(this);

        ImageButton viewFacebookFeed = (ImageButton) findViewById(R.id.ViewFacebookFeed);
        viewFacebookFeed.setOnClickListener(this);
        ImageButton viewTwitterFeed = (ImageButton) findViewById (R.id.ViewTwitterFeed);
        viewTwitterFeed.setOnClickListener(this);
    }

    public void onClick(View v) {
        switch(v.getId())
        {
            case R.id.Sendbutton:
                Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
                String[] recipients = new String[]{"email add", "",};
                emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, recipients);
                emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Sample mail");
                emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "This is a sample mail..");
                emailIntent.setType("text/plain");
                startActivity(Intent.createChooser(emailIntent, "Send mail client :"));
                finish();
                break;
            case R.id.ViewFacebookFeed:
                openBrowser1();
                break;
            case R.id.ViewTwitterFeed:
                openBrowser2();
                break;

        }
    }
    private void openBrowser1() 
    {       
        //this intent is used to open other activity which contains another webView
        Intent intent = new Intent(contactActivity.this,fbtwitterfeedActivity.class);
        startActivity(intent);
    }
    private void openBrowser2() {
        // TODO Auto-generated method stub
        Intent intent1 = new Intent(contactActivity.this,twitterfeedActivity.class);
        startActivity(intent1); 
    }
}   

