此题为判断题(对,错)。
第1题:
在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)
第2题:
在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)
第3题:
在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) ;
第4题:
3、在Activity中需要找到一个id是userName的的TextView组件,下面哪种语句写法是 正确的
A.TextView tv = this.findViewById(R.id.userName);
B.TextView tv = (TextView)this.findViewById(R.id.code);
C.TextView tv = (TextView)this.findViewById(R.id.userName);
D.TextViewtv=(TextView)this.findViewById(R.string.userName)
第5题:
在Android 中需要找一个id为label的TextView组件,下列哪个语句是正确的()
A.TextView tv=this.findViewById(R.id.label);
B.TextView tv=(TextView)findViewById(R.id.label);
C.TextView tv=(TextView)findViewById(R.layout. label);
D.TextView tv=(TextView)findViewById(R.string.label);