LayoutInflater.from(this).inflate(R.layout.main, myTabhost.getTabContentView(), true);myTabhost
.addTab(myTabhost.newTabSpec("Three")// make a new Tab
.setIndicator("C",getResources().getDrawable(R.drawable.notepad))
.setContent(R.id.widget_layout_red));
----------------
请问如何注册这个mian 里面button的监听貌似我下面的不行
  Button button1 = (Button) findViewById(R.id.widget30); 
        button1.setOnClickListener(new Button.OnClickListener() {
    
     @Override
    public void onClick(View v) {
     // TODO Auto-generated method stub
     Toast toast = Toast.makeText(getApplicationContext(),
          "自定义位置Toast", Toast.LENGTH_LONG);
        toast.setGravity(Gravity.CENTER, 0, 0);
        toast.show();
    
    
    }
     });其实我想问 在activiy里动态加载了layout
如何注册里面 button 什么的监听