在Activity中需要找到一个id是bookName的TextView组件 下面那种语句写法是正确的是()。
已帮助 人
在Activity中需要找到一个id是bookName的TextView组件,下面那种语句写法是正确的是()。
A.TextView tv=this.findViewByID(R,id.bookName)
B.TextView tv=(TextView)this.findViewByID(R.id.code)
C.TextView tv=(TextView)this.findViewByID(R.id.bookName)
D.TextView tv=(TextView)this.findViewByID(R.string.bookName)

回答
共1条回复-
TextView tv = (TextView)this.findViewById(R.id.bookName);
