开发者

Access another view's content from another view

I have an activity with two view.One view has the buttons and the other is main view.I must disable buttons for some circumstances inside main view.I couldn't figure o开发者_开发百科ut how to do that.


Button myBtn = (Button) ((MyActivity)getContext()).findViewById(R.id.mybtn);

I was calling this code inside constructor of my view.

That's why it's not working. Now it's working...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜