Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从它的 contentView 访问活动?contentView 是自定义布局实现。
我将“自定义布局实现”解释为您创建了View.
View
View可以调用的任何子类getContext()在所有正常情况下都将返回Activity承载View.
getContext()
Activity