Casting ‘findViewById(R.id.X)’ to ‘X’ is redundant
findViewById 会对Toolbar自动类型转换
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
可以更改为:
Toolbar toolbar = findViewById(R.id.toolbar);
redundant: 多余的意思
Casting ‘findViewById(R.id.X)’ to ‘X’ is redundant
findViewById 会对Toolbar自动类型转换
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
可以更改为:
Toolbar toolbar = findViewById(R.id.toolbar);
redundant: 多余的意思