0
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main2);
Main2Binding binding1 = Main2Binding.inflate(getLayoutInflater());
User user = new User("Test", "User");
MyHandlers myHandlers = new MyHandlers(this);
MyStringUtils myStringUtils= new MyStringUtils();
binding1.setUser(user);
binding1.setHandlers(myHandlers);
}
ページは、この問題を解決するための方法MainActivityBinding.inflate(getLayoutInflater())ページが更新されていない
MainActivityBinding binding1 = DataBindingUtil.setContentView (this, R.layout.main_activity); there is no problem
が更新されませんか?