在MainActivity中用addTab加载了tab.xml布局,但是tab.xml里的button的onclick应该写在哪里?我写在MainActivity中依然报错
Could not find method ok()(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatButton with id 'button'
不写在MainActivity中应该写在哪里?