setId(int)我看到了and的语法定义findViewByID(int)。
但是我们如何使用findViewById(R.id.row1)
我尝试使用这个:
Object1.setId(Integer.parseInt("repeat"));
它没有显示错误,但也运行了。
怎么了?如果setId(int)接受int并传递integer给它,那么错误是什么。When I commented the statement the program runs.
如果findViewById(int)接受整数,那么 isR.id.object_id是一个整数吗?如果是,它是如何映射的findViewById()?如果否,那么如何使用findViewByIdand setId。