title: How to create Clone-Duplicate View?
body: <p>In my android application, I want to create duplicate <code>ImageButton</code> of already created <code>Imagebutton</code>.</p>
  
  <p>I want to create new <code>Imagebutton</code> programmatically having same widht, height, background, image src, margins etc. of already created button in XML file. In short, I want to create duplicate <code>ImageButton</code>.</p>
  
  <p>I have try this</p>
  
  <pre><code>ImageButton mImageButton = (ImageButton) findViewById(R.id.ib);
  Imagebutton duplicate = mImageButton;
  </code></pre>
  
  <p>But it only refer to the the <code>mImageButton</code>. So, change in <code>duplicate</code> also cause change in <code>mImageButton</code>.</p>
  
  <p>Please help me out. Thank you...</p>