为什么加上 TextView textView = find
aide吧
全部回复
仅看楼主
level 6
g2345 楼主
为什么加上
TextView textView = findViewById(R.id.mainTextView1);
textView.setText("");这一行后,软件开始显示的那个"TODO:……"不见了
2018年07月11日 10点07分 1
level 13
""代表空字符 你这是设置文本为空
2018年07月11日 11点07分 2
感谢,我懂了
2018年07月11日 11点07分
level 12
[汗]
2018年07月11日 12点07分 3
level 13
现在好像初始化控件不要指明类型了
2018年07月11日 13点07分 4
26以后不用了,Activity源码加了泛型 public <T extends View> T findViewById(@idres int id) { return getWindow().findViewById(id); }
2018年07月12日 08点07分
@Raysen 那在低版本手机上运行没有问题吗?
2018年07月15日 01点07分
@初始状态0 java的泛型是通过加强制转型实现的,可以在低版本上运行的
2018年07月15日 02点07分
level 8
键盘眼熟[滑稽]
2018年07月15日 03点07分 5
就是你做的键盘,需要资源吗
2018年07月15日 09点07分
1