The main activity is launched with a layout that includes a EditText and 开发者_StackOverflowa custom SurfaceView. Inside the SurfaceView class, how can I access the global EditText object? For example, if I want to set EditText_object=VISIBLE?
You should probably just hand the TextView to the SurfaceView in code. In other words, a SurfaceView is something inside the view hierarchy and unrelated to the text view; there is some larger owner of the entire hierarchy (often an activity) that should be responsible for managing the interaction between them.
精彩评论