开发者

access global EditText inside a SurfaceView

开发者 https://www.devze.com 2023-03-08 05:48 出处:网络
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 exampl

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

精彩评论

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

关注公众号