In android i learnt the button to change text and then gestures to change text.I wanted to combine them and hence combined their code as follows. But the "main activity entends activity implements...." line is giving some error ..
Please help...



package com.example.shubhamchowdhary.shubhamtest_gesture;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.view.GestureDetector;
import android.support.v4.view.GestureDetectorCompat;
import android.view.MotionEvent;


public class MainActivity extends ActionBarActivity implements GestureDetector.OnGestureListener{// This line is an error

private TextView shubhamText;
private GestureDetectorCompat gestureDetector;


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

shubhamText=(TextView)findViewById(R.id.shubhamText);
this.gestureDetector=new GestureDetectorCompat(this,this);
gestureDetector.setOnDoubleTapListener(this);


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

shubhamButton.setOnClickListener(

new Button.OnClickListener(){

public void onClick(View v){
TextView shubhamText= (TextView) findViewById(R.id.shubhamText);
shubhamText.setText("Your Phone Is Hacked!!!");
}
}

);


shubhamButton.setOnLongClickListener(

new Button.OnLongClickListener(){

public boolean onLongClick(View v){

TextView shubhamText= (TextView) findViewById(R.id.shubhamText);
shubhamText.setText("Just Joking!!!!");

return true;}
}
);
}

@Override
public boolean onSingleTapConfirmed(MotionEvent e) {

shubhamText.setText("Single Tap!!!");
return true;
}

@Override
public boolean onDoubleTap(MotionEvent e) {
shubhamText.setText("Double Tap!!!");

return true;
}

@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
shubhamText.setText("Smooth Scroll!!!");

return true;
}


@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
shubhamText.setText("Flick It!!");

return true;
}

@Override
public boolean onTouchEvent(MotionEvent event) {
this.gestureDetector.onTouchEvent(event);

return super.onTouchEvent(event);
}



@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();

//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}

return super.onOptionsItemSelected(item);
}
}