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.

        Button button1 = (Button) findViewById(R.id.button1);

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