Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

不同的activity使用不同的对象的问题 #38

@rehan91

Description

@rehan91

原话:修改 BasicActivity 的 onCreate 方法,用 DatabindingUtil.setContentView() 来替换掉 setContentView(),然后创建一个 user 对象,通过 binding.setUser(user) 与 variable 进行绑定。

那不同的activity应该会使用不一样的对象,比如登陆就有可能使用user对象,而一个详情界面就使用一个
从服务器取回来的Detail对象,但是都继承自BaseActivity,设置user对象不对吧?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions