In my android application, I want to create duplicate ImageButton
of already created Imagebutton
.
I want to create new Imagebutton
programmatically having same widht, height, background, image src, margins etc. of already created button in XML file. In short, I want to create duplicate ImageButton
.
I have try this
ImageButton mImageButton = (ImageButton) findViewById(R.id.ib);
Imagebutton duplicate = mImageButton;
But it only refer to the the mImageButton
. So, change in duplicate
also cause change in mImageButton
.
Please help me out. Thank you...