2016-03-28 105 views

回答

0
btnDemo= (Button) findViewById(R.id.btnDemo); 

    btnDemo.setOnClickListener(new OnClickListener() { 

     @Override 
     public void onClick(View v) { 

      Intent intent = new Intent(MainActivity.this,NextActivity.class); 
      startActivity(intent); 
     } 
    }); 
+0

非常感謝,我會試試這個。 –

0
btnDemo= (Button) findViewById(R.id.btnDemo); 

btnDemo.setOnClickListener(new OnClickListener() { 

    @Override 
    public void onClick(View v) { 

     Intent intent = new Intent(MainActivity.this,NextActivity.class); 
     startActivity(intent); 
     MainActivity.this.finish(); 
    } 
}); 
相關問題