摘要:
今天在写一段代码时,两个Activity的Button设置了相同的ID,竟然没有报错。然后查看R.java文件,发现class id中也只生成了一个Button变量,且分别在两个Activity中进行访问时均可达到预期效果,觉得奇怪。一,查阅google帮助文档,现引用如下:IDsViews may have an integer id associated with them. These ids are typically assigned in the layout XML files, and are used to find specific views within the vie 阅读全文
浙公网安备 33010602011771号