토익단어보여주는 프로그램을 짜고 있는데요
핸들러 함수를 이용해서 단어를 깜빡 깜빡 보여주다가
뒤로가기 눌렀을때도 단어가 계속 다음단어로 넘어갑니다.
뒤로가기 눌렀을때 끝나도록 하려면
어떻게 수정해줘야할까요 ;;


public class SchoolActivity extends Activity {
   
 private Handler   mHandler;
 private TextView   mWordTXT, mDescTXT;
 
 private Cursor    mRows;
 private int    mWordNum;

 private final int  KEY_WORD_IDX = 1;
 private final int  KEY_DESC_IDX = 2;
 
 private final int  WORD_MSG = 0;
 private final int  DES_MSG = 1;
 
 private int    mCount=0;

 public DB_Adapter   db_adapter;
 
 private String   TAG = "BusinessActivity";

 

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.word_test);
       
        //- Database 생성-------------------------------
        db_adapter = new DB_Adapter(this);
        db_adapter.open();
       
        mRows = db_adapter.getRow("school");
        mWordNum = mRows.getCount();
        //-------------------------------------------------
       
  mWordTXT = (TextView) findViewById(R.id.wordTXT);
  mWordTXT.setText( mRows.getString(KEY_WORD_IDX));
  
  mDescTXT = (TextView) findViewById(R.id.descTXT);
  
  mHandler = new Handler(){

   @Override
   public void handleMessage(Message msg) {
    
    Log.i(TAG, "handleMessage() : mCount = " + mCount);
    
    if(mCount<mWordNum)
    {
     switch(msg.what)
     {
      case WORD_MSG:
        mWordTXT.setText(mRows.getString(KEY_WORD_IDX));
        mDescTXT.setText("");

        Log.i(TAG, "handleMessage() : WORD_MSG mCount = " + mCount);
        
        mHandler.sendEmptyMessageDelayed(DES_MSG, 3000);
        break;
       
      case DES_MSG:
        mDescTXT.setText(mRows.getString(KEY_DESC_IDX));

        Log.i(TAG, "handleMessage() : DES_MSG mCount = " + mCount);
        
        mHandler.sendEmptyMessageDelayed(WORD_MSG, 2000);
        mCount++;
        mRows.moveToNext();
        break;
     }
     
    }else{
     mCount =0;
     mWordTXT.setText("END");
     mDescTXT.setText("");
    }
    
   }
  };
  
  mHandler.sendEmptyMessageDelayed(DES_MSG, 3000);
  
    }
   
   
    @Override
 protected void onPause() {
  // TODO Auto-generated method stub
  super.onPause();
  
  db_adapter.close();
 }


 @Override
    public boolean onCreateOptionsMenu(Menu menu) {

     menu.add(0,0,0, "되돌아가기");
       
     return super.onCreateOptionsMenu(menu);
     
     }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
     
     Intent goINT = new Intent(SchoolActivity.this, StartMenuActivity.class);
     startActivity(goINT);
     
     return super.onOptionsItemSelected(item);
      
    }

}