For example, I want to create an instance of a button:
Button btn = (Button) findViewById(R.id.button); Can I follow R.id. set the variable in which the button value will be stored. And how can I get an instance of the button findViewById , but if I have a variable in which the button id is stored.