I’m trying to simplify my code, but for some reasons the “setText” method is not available.
Here is the code which is currently working for me:
TextView textView = (TextView)view.findViewById(R.id.testId);
textView.setText("Test");
I’m trying to simply it to this code:
(TextView)view.findViewById(R.id.testId).setText("Test");
But I’m getting the error message: “Cannot find symbol”.
Even IDE does not give me this option:

However, this code is working fine for some other things, like this:
view.findViewById(R.id.another_testID).setOnClickListener(test_listener);
Any ideas?
For a one liner:
Note the extra brackets added.