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.
我有一个扩展“相对布局”的自定义视图(实际上是一个自定义列表视图项)。我无法将应用程序对象传递给此视图。那么我如何从这个视图中访问应用程序对象。
打电话getContext().getApplicationContext()。
getContext().getApplicationContext()