sele_server_btn.performClick(); 
sele_server_btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
}
});

解决方案 »

  1.   

    多谢指点, 我把启动设置界面的入口写在 menu 里面了
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    // TODO Auto-generated method stub
    if (item.getItemId()==R.id.action_exit){
    finish();
    }else if (item.getItemId()==R.id.action_about) {
    Intent intent = new Intent();
    intent.setClass(MainActivity.this,AboutActivity.class);
    MainActivity.this.startActivity(intent);
    }else if (item.getItemId()==R.id.action_settings){
    Intent intent1 = new Intent();
    intent1.setClass(MainActivity.this,SetingActivity.class);
    MainActivity.this.startActivity(intent1);
    }

    return super.onOptionsItemSelected(item);
    }应该如何调用才能相当于点了MENU 里面的第1个ITM