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.
主 Activity 使用包含 EditText 和自定义 SurfaceView 的布局启动。在 SurfaceView 类中,如何访问全局 EditText 对象?例如,如果我想设置 EditText_object=VISIBLE?
您可能应该只在代码中将 TextView 交给 SurfaceView。换句话说,SurfaceView 是视图层次结构中的东西,与文本视图无关;整个层次结构(通常是一个活动)的某个更大的所有者应该负责管理它们之间的交互。