阅读背景:

Android:更改按钮的父视图

来源:互联网 

I have a RelativeLayout with a button inside it. Once the user clicks on that button, I would like to change the background of the parent view (RelativeLayout). I know I can do this by storing the parent view in a variable or setting a tag on the button, but I'd lime to avoid that (I have very good reasons for not wanting this). Isn't there a way to just access the parent view from the button itself?I have a RelativeLayout with a button inside it




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: