findViewById() is a method that you call in a view that you have already inflated from an XML file (see this question for more information on inflating views; also the documentation for findViewById ).
"RelativeLayout01" in this example refers to the identifier specified in the main layout in the XML file associated with the Activity that contains the click listener that you are writing. It is just a placeholder; set the identifier on the main layout in the Activity XML file and use this code in the code to place the image.
Also, if you havenβt done so yet, read the documentation for XML layouts ; which should clarify some things. The android:id attribute (see Sample XML file, the attribute can be applied to any element) is the one that relates to your question.
source share