I keep getting an error on the onLongClick part of this function. I want the click to take the user to phone dialer (this works), but when adding the onLongClick to go to the dialer settings activity I am getting errors. Ive tried with a public void and public boolean, but eclipse still has error, help appreciated.

Code:
 
        Button button1 = (Button) findViewById(R.id.button1);
          button1.setText(phonelbl[0]);

          button1.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
            	launchDialer(phone[1]);
            }
          });
         // button1.setLongClickable(true); 
          
          button1.setOnLongClickListener(new OnLongClickListener() {
              @Override
              public boolean onLongClick(View v) {
              //public void onLongClick(View v) {            	  
             	 Intent i = new Intent(MainActivity.this, AddDiner.class);
             	 startActivity(i);             
              }
          });
I fixed it. I needed return true; in the onLongClick function