开发者

access global EditText inside a SurfaceView

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜