I am a beginner in android app development, I have seen there are two methods to handle on button click.
First one is using setOnClickListener and second is using xml attribute onClick.
onClick xml attribute quite easy for beginner/me.
I can change button text by creating an object of a button and then: btn.setText("Button Clicked");
But my question is can I use setText, isEnabled, etc.. methods for button without creating its object.
Is possible to change button text without creating a Button Object or using the XML attribute onClick.